MATH0011 video 14 - tuples and mutability

Опубликовано: 05 Сентябрь 2026
на канале: Matthew Towers
65
1

Defining tuples. Special cases for tuples of length 0 and 1. Using len on tuples, concatenating tuples, and accessing the ith element of a tuple. Lists are mutable, which means you can modify a list after it was created, but tuples are immutable. Examples of potentially useful but also potentially confusing behaviour arising from using mutable variables: functions which do and do not modify their arguments, and how modifying one mutable variable can unexpectedly modify another.