fork download
  1. finished_sandwichs = []
  2. sandwich_order = ['sandwich_tuna', 'sandwich_pastrami', 'sandwich_cheese', 'sandwich_pastrami', 'sandwich_meat', 'sandwich_pastrami']
  3.  
  4. print("We are sorry, but 'Pastrami' sold out.\n")
  5. while sandwich_order:
  6. making_sandwich = sandwich_order.pop()
  7. if making_sandwich == 'sandwich_pastrami':
  8. continue
  9. else:
  10. print("Your " + making_sandwich + " is making.")
  11. finished_sandwichs.append(making_sandwich)
  12.  
  13. print('\nYour sandwichs:')
  14. for making_sandwich in finished_sandwichs:
  15. print(making_sandwich)
Success #stdin #stdout 0.02s 9148KB
stdin
Standard input is empty
stdout
We are sorry, but 'Pastrami' sold out.

Your sandwich_meat is making.
Your sandwich_cheese is making.
Your sandwich_tuna is making.

Your sandwichs:
sandwich_meat
sandwich_cheese
sandwich_tuna