forked from CodeMouse92/DeadSimplePython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocess_orders.py
More file actions
27 lines (23 loc) · 764 Bytes
/
process_orders.py
File metadata and controls
27 lines (23 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from collections import deque
customers = deque([
('Newman', 'tea'),
('Daniel', 'lemongrass tea'),
('Simon', 'chai latte'),
('James', 'medium roast drip, milk, 2 sugar substitutes'),
('William', 'french press'),
('Kyle', 'mocha cappuccino'),
('Jason', 'pumpkin spice latte'),
('Devin', 'double-shot espresso'),
('Todd', 'dark roast drip'),
('Glen', 'americano, no sugar, heavy cream'),
('Denis', 'cold brew')
])
# for customer, drink in customers.copy():
# print(f"Making {drink}...")
# print(f"Order for {customer}!")
# customers.popleft()
# print(customers) # prints deque([])
while customers:
customer, drink = customers.popleft()
print(f"Making {drink}")
print(f"Order for {customer}!")