01 / 07
Changing a value
Write the same shape you use to take something out, but on the left of an =, and you change that value.
It feels just like putting a value into a variable. You are dropping a new value into the slot called person["age"].
person = {"name": "Yui", "age": 15}person["age"] = 16print(person)Result
{'name': 'Yui', 'age': 16}