Source Code:
(back to article)
my_dict = { "person1": { "name": "John", "age": 30 }, "person2": { "name": "Jane", "age": 25 } } my_dict["person3"] = { "name": "Mike", "age": 40 } print(my_dict["person3"]["name"]) # Output: Mike
Result:
Report an issue