# 7-8
sandwich_orders = ['tuna sandwich', 'peanut sandwich', 'veal sandwich']
finished_sandwiches = []
while sandwich_orders:
sandwich = sandwich_orders.pop()
print('I made your ' + sandwich)
finished_sandwiches.append(sandwich)
# 7-9
sandwich_orders = [
'tuna sandwich', 'peanut sandwich', 'pastrami', 'veal sandwich',
'pastrami', 'pastrami'
]
print('Pastrami has sold out')
while'pastrami'in sandwich_orders:
sandwich_orders.remove('pastrami')
print(sandwich_orders)
# 7-10
responses = {}
polling_active = Truewhile polling_active:
name = input("\nWhat is your name? ")
response = input(
"If you could visit one place in the world, where would you go? ")
responses[name] = response
repeat = input("Would you like to let another person respond? (yes/ no) ")
if repeat == 'no':
polling_active = False
print("\n--- Poll Results ---")
for name, response in responses.items():
print(name + " would like to visit " + response + ".")