in — Expert Playground
Membership test operator; also used in for loops to iterate over items
Python Playground
Output
Click "Run" to execute your code'in' for membership compiles to CONTAINS_OP, while 'in' in for loops compiles to GET_ITER + FOR_ITER. They look the same in source but are completely different operations.
Challenge
Try modifying the code above to explore different behaviors. Can you extend the example to handle a new use case?