list.reverse()
#!/usr/bin/python3 a = [‘abc‘, ‘2019_11‘, ‘pople‘, ‘jack‘] a.reverse() print("反转后的排序:" + str(a))
输出:
反转后的排序:[‘jack‘, ‘pople‘, ‘2019_11‘, ‘abc‘]
Python reverse()方法--list
原文:https://www.cnblogs.com/yuelaoban/p/10609754.html