'This'] = 'that'
>>> print(d.setdefault('this', 'other'))
that
>>> len(d)
1
>>> print(d['this'])
that
>>> print(d.setdefault('That', 'other'))
other
>>> print(d['THAT'])
other

Make it pop!

>>> print(d.pop('THAT'))
other

To retrieve the key in its originally-supplied form, use matching_key_for

>>> print(d.matching_key_for('this'))
This

>>> d.matching_key_for('missing')
Traceback (most recent call last):
...
KeyError: 'missing'
c