Операторы членства Python
Операторы членства Python
Операторы принадлежности используются для проверки наличия последовательности в объекте:
Operator | Description | Example | Try it |
---|---|---|---|
in | Returns True if a sequence with the specified value is present in the object | x in y | |
not in | Returns True if a sequence with the specified value is not present in the object | x not in y |