A dictionary stores unique keys and their values.
Dictionaries organize related data by meaningful keys instead of numeric positions.
student = {"name": "Ana", "age": 22}
print(student["name"])Square brackets use a key to access its associated value.
Try changing one value, then explain which part of the collection changed and why.
Keep this in mind: Read the collection operation before predicting the result.
student = {"name": "Ana", "age": 22, "course": "Python"}
print(student["name"])
student["age"] = 23
student["city"] = "Novi Sad"
print(student["age"])
print(student.get("city"))Run the example, then change one value and observe the result.
