Skip to main content
Close announcements banner

The "in" operator

The in operator allows you to check if a value is present in a set of values. It can be used with the operator not to check if a value is missing from a set of values. The set of values is specified as an array.

For example, the following expressions return true:
city = 'Paris', city in ['New York', 'London', 'Paris', 'Tokyo', 'Pekin']
6 not in [1, 2, 3, 4, 5]

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!