Iterating over dictionary items in Python

friend_ages = {"Rolf": 25, "Anne": 37, "Charlie": 31, "Bob": 22}
for name, age in friend_ages.items():
  print(f"{name} is {age} years old.")
Output:
Rolf is 25 years old.
Anne is 37 years old.
Charlie is 31 years old.
Bob is 22 years old.