How to find the value at index in a dictionary Python?

Is it possible to look up a value in a dictionary (dictionary) in the index?
Or just the key values?
June 10th 19 at 16:58
2 answers
June 10th 19 at 17:00
and what is the need? if you just iterate over the dictionary to search for value, it is possible to iterate for k in basslover, k is the key. Or get all values basslover.values()
June 10th 19 at 17:02
d = {'a':'1', 'b':3, 'c':5}
tmp=list(d)
print(d[tmp[2]])
Only works correctly in CPython versions 3.6.x and 3.7.x. - kacie60 commented on June 10th 19 at 17:05
well, of course, the dictionary-that was ordered with the 3.6
he list with a 3.0, but the order is promised to no one - Juanita17 commented on June 10th 19 at 17:08

Find more questions by tags Python