To sort a dictionary" (Python recipe)
5 | Dictionaries can't be sorted -- a mapping has no ordering! -- so, when you feel the need to sort one, you no doubt want to sort its keys (in a separate list). Sorting (key,value) pairs (items) is simplest, but not fastest.
|
沒有留言:
張貼留言