python中实现列表的倒序排列
1、
>>> a = ["aaa","bbb","ccc","ddd"]
>>> b = reversed(a)
>>> c = []
>>> for i in b:
c.append(i)
>>> c
['ddd', 'ccc', 'bbb', 'aaa']
2、
>>> a = ["aaa","bbb","ccc","ddd"]
>>> a.reverse()
>>> a
['ddd', 'ccc', 'bbb', 'aaa']