Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Well, if you use the latest versions of python where the dictionaries are ordered, and if you completely stop:
my_dict = {'a': 11, 'b': 22, 'c': 33}
>>> my_dict[list(my_dict.keys())[0]]
11
>>> my_dict[list(my_dict.keys())[2]]
33
>>> my_dict[list(my_dict.keys())[1]]
22
Dictionaries in Python are unordered collections of arbitrary objects accessed by key . They are sometimes also called associative arrays...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question