Chapter 9. Lists, tuples, and sets

 

5.1. Lists are like arrays

5.2. List indices

5.3. Modifying lists

5.4. Sorting lists

5.4.1. Custom sorting

5.4.2. The sorted() function

5.5. Other common list operations

5.5.1. List membership with the in operator

5.5.2. List concatenation with the + operator

5.5.3. List initialization with the * operator

5.5.4. List minimum or maximum with min and max

5.5.5. List search with index

5.5.6. List matches with count

5.5.7. Summary of list operations

5.6. Nested lists and deep copies

5.7. Tuples

5.7.1. Tuple basics

5.7.2. One-element tuples need a comma

5.7.3. Packing and unpacking tuples

5.7.4. Converting between lists and tuples

5.8. Sets

5.8.1. Set operations

5.8.2. Frozensets

Summary