Lists have a .sort() method and there's a sorted() function. Do they behave the same?
.sort()
sorted()
loot = [3, 1, 2] ordered = loot.sort() backwards = sorted(loot, reverse=True) print(ordered, loot, backwards)
None [3, 1, 2] [2, 1, 3]
None [1, 2, 3] [3, 2, 1]
[1, 2, 3] [3, 1, 2] [3, 2, 1]
[1, 2, 3] [1, 2, 3] [3, 2, 1]