如何在python列表中向下循环(倒数)
问题描述:
如何在python列表中循环显示?
how to loop down in python list?
例如
循环:
L = [1,2,3]
for item in L
print item #-->1,2,3
循环播放
L = [1,2,3]
for ???
print item #-->3,2,1
谢谢
答
另一种解决方案:
for item in L[::-1]:
print item