>>> d = dict()>>> d['key'] = 'value'>>> d.setdefault('key', 'another value')<<< 'value'>>> d['key']<<< 'value'>>> d.setdefault('another key', 'another value')<<< 'another value'