Collections in Python
Lessons in this section
- Lists
Creating, indexing and slicing lists, updating and removing items, sorting with sort() and sorted(), shallow against deep copying, and every list method.
- Tuples
Immutable ordered records: the trailing-comma trap, slicing, rebuilding instead of changing, packing and unpacking, and the two tuple methods.
- Sets
Unique unordered values: creating sets, add and discard, union, intersection and difference, the whole method list, and frozen sets.
- Dictionary
Key-value pairs: key rules, get() against square brackets, adding and removing, looping over keys, values and items, and every dictionary method.