Strings, lists, tuples, sets and dictionaries
Immutable objects such as numbers, strings and tuples cannot be changed after creation, whereas mutable objects such as lists, sets and dictionaries can. This affects how values are copied and passed to functions.
Strings support indexing, slicing and traversal along with many built-in functions such as upper, lower, split, join, find and replace, plus concatenation and repetition operators.
Lists are ordered, mutable sequences supporting creation, traversal, slicing and splitting, with methods like append, insert, pop and sort; lists can be passed to functions and built with comprehensions.
Tuples are immutable sequences, sets store unique unordered items with union and intersection operations, and dictionaries hold key-value pairs with fast lookup.
This unit explored mutability, strings and their built-in functions, lists with slicing and functions, and the tuple, set and dictionary structures with their operations.