1# To get all the keys of a dictionary use 'keys()'
2newdict = {1:0, 2:0, 3:0}
3newdict.keys()
4# Output:
5# dict_keys([1, 2, 3])
1# To get all the keys of a dictionary as a list, see below
2newdict = {1:0, 2:0, 3:0}
3list(newdict)
4# Output:
5# [1, 2, 3]