You can loop over a dictionary using a for
for
my_dict = {"one": 1, "two": 2} for key, value in my_dict.items(): print(key, value) # --------------output-------------- # ("one", 1) # ("two", 2)