Learning outcomes
By the end of this chapter, you should be able to:- identify list, tuple, set, and dictionary
- explain mutable vs immutable types
- perform basic operations on each
30-minute recording plan
0-7 min: list and tuple basics7-14 min: set behavior and uniqueness14-21 min: dictionary key-value model21-26 min: mutable vs immutable comparison26-30 min: exam-type type-selection questions
Why this chapter matters
- Most real programs store multiple values, not single values.
- Choosing the correct data type reduces bugs and improves clarity.
- Many exam questions ask “which type should be used and why?”
List
Ordered, mutable collection.Tuple
Ordered, immutable collection.Set
Unordered collection of unique elements.Dictionary
Key-value mapping.Mutable vs immutable
- mutable: list, set, dictionary
- immutable: tuple, string, int, float, bool
Common operations
Mini showcase: attendance dashboard
Exam-focused points
- list uses
[], tuple uses(), set uses{}without key-value pairs - dictionary keys must be unique
- sets remove duplicates and are unordered
Practice questions
- Create a list of 5 numbers and print max/min.
- Create a dictionary for a student with 4 fields.
- Convert list
[1, 2, 2, 3, 3, 3]into unique values using set.
