Dictionary (Python)
A Python dictionary stores data as key–value pairs in curly braces. You look values up by their key instead of by position.
Python
Examples
Python
user = {"name": "Ana", "age": 30}
print(user["name"])Output:
AnaA Python dictionary stores data as key–value pairs in curly braces. You look values up by their key instead of by position.
Python
Python
user = {"name": "Ana", "age": 30}
print(user["name"])Output:
Ana