Operatori di appartenenza a Python
Operatori di appartenenza a Python
Gli operatori di appartenenza vengono utilizzati per verificare se una sequenza è presentata in un oggetto:
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 |