Iterating over dictionary keys in Python

friend_ages = {"Rolf": 25, "Anne": 37, "Charlie": 31, "Bob": 22}
for name in friend_ages:
  print(name)
Output:
Rolf
Anne
Charlie
Bob