Iterating over dictionary values in Python

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