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 |