Python: Creating a Dictionary with Two Lists
Posted: Sun Aug 24, 2025 4:49 am
Code: Select all
print("Top Three Finalists in the Race:")
keys = ['1', '2', '3']
values = ['tortoise', 'hare', 'penguin']
dictionary_of_race_finalists = dic(zip(keys, values))
for d in dictionary_of_race_finalists:
print(d)