Something like this will work:
set1 = { 'name': 'Michael', 'place': 'London', ... } # same for set2 d = dict() d['set1'] = set1 d['set2'] = set2
Then you can do:
d['set1']['name']
etc .. It is better to think of it as a nested structure (instead of a two-dimensional matrix):
{ 'set1': { 'name': 'Michael', 'place': 'London', ... } 'set2': { 'name': 'Michael', 'place': 'London', ... } }
Look here for an easy way to visualize nested dictionaries.
source share