How to Print Dictionary Keys One By One in Python


In this example we will show how to print dictionary keys one by one in Python.

Source Code

mydict = {
  'name': 'Steven',
  'age': 24,
  'ID': 123456
}

for x in mydict:
  print(x)

Output:

name
age
ID
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments