example_dict['key1'] = {'attr1':1,'attr2':2} # You can get multiple times for nested dicts, # by returning an empty dict if not found: example_dict.get('key1', {}).get('attr1')