d = {} r = d.get('missing_key', None)
d.setdefault('k1', 100) print(d) # {'k1': 1, 'k2': 2, 'k3': 3, 'k4': None}