sorted() can sort everything, return a list, won’t change anything
sort() sort immediately
Key can be the length, or the return value of a function, to be called on each list element prior to making comparisons. And Anonymous Function
here’s a case-insensitive string comparison: sorted("This is a test string from Andrew".split(), key=str.lower)
A common pattern is to sort complex objects using some of the object’s indices as keys. For example:
map
map() 是 Python 内置的高阶函数,它接收一个函数 f 和一个 list,并通过把函数 f 依次作用在 list 的每个元素上,得到一个新的 list 并返回。
zip
The zip() function takes iterables (can be zero or more), aggregates them in a tuple, and returns it.