Sorry this is probably very simple, but I suspect I'm wording the question wrong from inexperience so I haven't been able to find the answer anywhere.
I have a dictionary, e.g.:
dict = {1: 'a', 2: 'b'}
I want to select specific values within the dictionary from knowing only their position in the dictionary.
For example I want to print the first key, and all I know about the key is that it's the first key in the dictionary, not its actual name to call on.
I am trying:
dict[0][0]
And I'm expecting this to output 1
, the first key in the dictionary - but I'm not experienced in python so I'm not sure how to get this working?