标签:
Tuple An immutable data value that contains related elements. Tuples are used to group together related data, such as a person‘s name, their age, and their gender.
?
Heterogeneous(异构)?can be composed of elements of different types.
year_born = ("Paris Hilton", 1981)
?
students = [
("John", ["CompSci", "Physics"]),
("Vusi", ["Maths", "CompSci", "Stats"]),
("Jess", ["CompSci", "Accounting", "Economics", "Management"]),
("Sarah", ["InfSys", "Accounting", "Economics", "CommLaw"]),
("Zuki", ["Sociology", "Economics", "Law", "Stats", "Music"])]
?
Packing & Un-Packing
?
Reference:<How to Think Like a Computer Scientist>
标签:
原文地址:http://www.cnblogs.com/permanence-practice/p/4852058.html