sandwich_ordes = ['1','pastrami','3','pastrami','4']
finished_sandwiches = []
message = "\n The pastrami has been sold out!"
print(message)
while sandwich_ordes:
sandwich = sandwich_ordes.pop()
finished_sandwiches.append(sandwich)
while 'pastrami' in finished_sandwiches:
finished_sandwiches.remove('pastrami')
print(finished_sandwiches)
The pastrami has been sold out!
['4', '3', '1']