Is there a way to get the key at a specified position?
First off, you probably shouldn't do this, because this is not how dictionaries were intended to be accessed.
But if you really need to do this, probably the most straightforward way is to get the list of keys from the dictionary, and then access the dictionary using the first key.
Something like:
list_of_keys = [key for key in Hobbies.keys()]
key_of_interest = list_of_keys[0]
value_of_interest = Hobbies[key_of_interest]

Or as a one-liner:
value_of_interest = Hobbies[[key for key in Hobbies.keys()][0]]

This may also work, but I'm not sure if the order of values is guaranteed the same way the order of keys is.  It probably is, but I can't say for sure:
value_of_interest = [value for value in Hobbies.values()][0]


I wanted to print out a key at a specific position (like 1) in a dictionary, but the code didn't seem to work at all.
    Hobbies={
      football(american):1
      baseball:2
      basketball:3
      playing_cards:4
      swimming:5
      soccer:7
   }

I used this line :
     print (Hobbies[1])

But it got an error
How should I fix it?
