LLD - Design — Online Shopping Cart
Given this order state machine code snippet:
states = ['Pending', 'Processing', 'Shipped']
transitions = {('Pending', 'Processing'), ('Processing', 'Shipped')}
current_state = 'Pending'
next_state = 'Shipped'
if (current_state, next_state) in transitions:
print('Valid transition')
else:
print('Invalid transition')What will be printed?
