# To get all the keys of a dictionary use 'keys()'
newdict = {1:0, 2:0, 3:0}
newdict.keys()
# Output:
# dict_keys([1, 2, 3])
dict={1:2,3:4}
list_of_keys=list(dict)
# output
# [1, 3]
# Python program to get
# dictionary keys as list
def getList(dict):
list = []
for key in dict.keys():
list.append(key)
return list
# Driver program
dict = {1:'Geeks', 2:'for', 3:'geeks'}
print(getList(dict))
d = {2:"hello"}
d.values()