LLD - Design — Online Shopping Cart
Identify the bug in this order state machine method that allows invalid state transitions:
def deliver(self):
if self.state == 'Shipped' or 'Out for Delivery':
self.state = 'Delivered'
else:
raise Exception('Invalid transition');
