Lesson 5 of 10
Dictionaries
A dictionary stores data as key-value pairs, just like a real dictionary has words and definitions. Use curly braces {} and access values by their key.
PYTHON
user = {
"name": "Ali",
"age": 25,
"country": "Denmark"
}
print(user["name"])
user["age"] = 26
print(user.keys())
print(user.values())