get all keys of dict in python code example
Example 1: get all keys and values from dictionary python
#python 3
for k,v in dict.items():
print(k, v)
Example 2: python get dictionary keys
d = {2:"hello"}
d.values()
#python 3
for k,v in dict.items():
print(k, v)
d = {2:"hello"}
d.values()