📅  最后修改于: 2022-03-11 14:46:55.642000             🧑  作者: Mango
# Ordering
[1,2,5,3].sort() # None --> Mutates list to [1, 2, 3, 5]
[1,2,5,3].sort(reverse=True) # None --> Mutates list to [5, 3, 2, 1]
[1,2,5,3].reverse() # None --> Mutates list to [3, 5, 2, 1]
sorted([1,2,5,3]) # [1, 2, 3, 5] --> new list created
list(reversed([1,2,5,3]))# [3, 5, 2, 1] --> reversed() returns an iterator