Dictionaries (dict)

Dictionaries are unordered, mutable key-value collections. They are fundamental in Python for structuring data.

person = {
    "name": "Laura",
    "age": 28,
    "occupation": "Engineer"
}

You can access and modify elements by their key:

print(person["name"])  # Laura
person["age"] = 29

They can also be iterated through with loops:

for key, value in person.items():
    print(f"{key}: {value}")