I have a dictionary that looks like the below.
For the keys ‘10000ag2′ and 10000ag1’, what is the the most efficient means to find out which key has the last_event with the maximum date?
{'10000ag2':
{'last_view': datetime.datetime(2012, 4, 24, 8, 27, 30),
'last_event': datetime.datetime(2012, 4, 24, 8, 28, 30),
'last_prid': '300'},
'10000ag1':
{'last_view': datetime.datetime(2012, 4, 24, 8, 27, 30),
'last_event': datetime.datetime(2012, 4, 24, 8, 28, 30),
'last_prid': '300'}}
I expect a list of e.g. 20 top level keys.
thanks
1 Answer