demo_ref_dictionary_setdefault2.py:
car = { "brand": "Ford", "model": "Mustang", "year": 1964 } x = car.setdefault("color", "White") print(x)
➜ begtut>python demo_dictionary_setdefault2.py
White