#按照要求创建一个包含各种三明治名为sandwich_orders的列表
sandwich_orders = ['Black Forest Ham','pastrami',\
'Cold Cut Combo','Italian B.M.T.','pastrami',\
'Oven Roasted Chicken','Roast Beef','pastrami',\
'Spicy Italian','Steak & Cheese','Subway Club',\
'pastrami','Classic Tuna','Turkey Breast',\
'Veggie Delite']
#在创建一个名为finished_sandwiches的空列表
finished_sandwiches = []
# 五香烟熏牛肉买完了
print(f'\nThe pastrami is sell up!')
#遍历列表sandwich_orders,并删除里面的五香烟熏牛肉三明治
while 'pastrami' in sandwich_orders:
sandwich_orders.remove('pastrami')
print(sandwich_orders)
#遍历列表sandwich_orders,并对其中每种三明治都打印一条消息
while sandwich_orders:
current_orders = sandwich_orders.pop()
print(f'\nI made your {current_orders}!')
finished_sandwiches.append(current_orders)
#对已经添加进finished_sandwiches列表的元素进行倒序打印!使其
#与sandwich_orders列表元素排列一致
finished_sandwiches.reverse()
print(f'\n---All Sandwiches are finished--- ')
for finished_sandwich in finished_sandwiches:
print(finished_sandwich.title())