Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python get dictionary keys

# 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])
 
PREVIOUS NEXT
Tagged: #python #dictionary #keys
ADD COMMENT
Topic
Name
3+8 =