← Python Programming learning pathPython Programming · Module 7 of 10
Lists, tuples and dictionaries
Store many values in lists, fixed groups in tuples, and key-value pairs in dictionaries.
📖 Key ideas
- A list holds items in order and can change: marks = [80, 90].
- append(), insert(), remove(), sort() change a list.
- A tuple is like a list but cannot change: point = (3, 4).
- A dictionary maps keys to values: student = {"name": "Asha", "age": 20}.
- A set keeps unique values only.
💡 Real-life example: A list is a shopping list, a tuple is your date of birth (fixed), a dictionary is a phone book (name to number).
listOrdered collection that can change
tupleOrdered collection that cannot change
dictKey-value pairs
setUnique values only