摘要:
A tuple is a sequence of values. The values can be any type, and they are indexed by integers, so in that respect tuples are a lot like lists. The imp... 阅读全文
摘要:
If you played with the Fibonacci function, you might have noticed that the bigger the argument you provide, the longer the function takes to run. Furt... 阅读全文
摘要:
Lists can appear as values in a dictionary. For example, if you were given a dictionary that maps from letters to frequencies, you might want to inver... 阅读全文
摘要:
If you use a dictionary in a for statement, it traverses the keys of the dictionary. For example, print_hist prints each key and the corresponding val... 阅读全文