Dictionaries
Objective
Introductory Problem
done = False
friends = ["Sofia", "Alex", "Sam"]
towns = ["Paterson", "Passaic", "Clifton"]
while not done:
print("Menu")
print("I - Introductory Problem")
print("Q - Quit")
choice = input("Choice: ")
if choice == "I":
print("Introductory Problem")
for i in range(len(friends)):
print(friends[i])
for i in range)len(towns)):
print(towns[i])
elif choice == "Q":
print("Exiting Game!")
done = TrueDictionaries
Dictionary Functions and Operations
Examples
Example 1
Example 2
Example 3
Example 4
Last updated
Was this helpful?