LLD - Design — Online Shopping Cart
Find the error in this transition check:
def can_transition(current, next_state):
valid = {
'Pending': ['Processing', 'Cancelled'],
'Processing': ['Shipped']
}
return next_state in valid[current]