很多情况下,不同种类的序列(字符串、列表和元组)是可以交换使用的。那么该如何选择用哪种序列呢?
In many contexts, the different kinds of sequences (strings, lists and tuples) can be used interchangeably. So how should you choose one over the others?
当然,很少有 Python 程序员希望使用上面的诸如列表、元组和字典等日益复杂的数据结构。
Of course, few Python programmers want to work with increasingly complex forests of data structures like the lists, tuples, and dictionaries above.
表示中没有使用专门的python类——只使用了元组、字典、列表和字符串(以及保留位置上的None)。
No specialized Python classes are used in the representation — just tuples, dicts, lists, and strings (and None in the reserved position).
应用推荐