Python sorting

From wikinotes
foo = sorted(['z', 'b', 'a'])  # new copy
sort(mylist)                   # mutates 'mylist'
sorted(mylist, key=lambda x: x % 2)  # sort by result of 'key'