simeonshopov

Supermarket

Mar 11th, 2020
478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. from collections import deque
  2.  
  3. customers = deque([])
  4.  
  5. while True:
  6.     command = input()
  7.     if command == 'End':
  8.         break
  9.     elif command == 'Paid':
  10.         print('\n'.join(customers))
  11.         customers.clear()
  12.     else:
  13.         name = command
  14.         customers.append(name)
  15.  
  16. print(f'{len(customers)} people remaining.')
Advertisement
Add Comment
Please, Sign In to add comment