Operátoři členství v Pythonu
Operátoři členství v Pythonu
Operátory členství se používají k testování, zda je sekvence prezentována v objektu:
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 |