Type something to search...

Python Dictionaries

Python Dictionaries

Dictionaries are used to store data in key-value pairs.

Example:

person = {"name": "John", "age": 25}
print(person["name"])

Adding and Updating Values

You can add or update values in a dictionary.

Example:

person["city"] = "New York"
print(person)

Next Steps

In the next tutorial, we will explore Python Loops.

Next: Python Loops →