Sorry for this basic question but my searches on this are not turning up anything other than how to get a dictionary\'s key based on its value which I would prefer not to us
keys=[i for i in mydictionary.keys()] or keys = list(mydictionary.keys())
keys=[i for i in mydictionary.keys()]
keys = list(mydictionary.keys())
If the dictionary contains one pair like this:
d = {'age':24}
then you can get as
field, value = d.items()[0]
For Python 3.5, do this:
key = list(d.keys())[0]