How to access the values from a dictionary using index in Python

1 Answer

0 votes
dict = {} 

dict['a'] = 10
dict['b'] = 11
dict['c'] = 22
dict['d'] = 33

values = list(dict.values())
print(values[2])





'''
run:

22

'''

 



answered Apr 11, 2021 by avibootz

Related questions

1 answer 312 views
1 answer 264 views
3 answers 442 views
1 answer 322 views
...