Python -Zugehörigkeitsoperatoren
Python-Zugehörigkeitsoperatoren
Zugehörigkeitsoperatoren werden verwendet, um zu testen, ob eine Sequenz in einem Objekt dargestellt wird:
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 |