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

1 Answer

0 votes
dict = {} 

dict['a'] = 0
dict['b'] = 1
dict['c'] = 2
dict['d'] = 3

keys = list(dict.keys())

print(keys[2])



'''
run:

c

'''

 



answered Apr 11, 2021 by avibootz
...