Run Program ❯
Python Home
❯
Run Code
Change Orientation
# Creating a dictionary person = { "name": "Alice", "age": 30, "city": "New York" } # Accessing and modifying values print("Name:", person["name"]) person["age"] = 31 # Updating value print("Updated dictionary:", person) # Adding a new key-value pair person["profession"] = "Engineer" print("After adding profession:", person)