Which out of the following is considered as a membership operator in Python?
2023
Which out of the following is considered as a membership operator in Python?
Answer: A. in — The in operator checks whether a value exists in a sequence such as a list, tuple, or string.
- A.
in
- B.
or
- C.
not
- D.
is
Attempted by 2967 students.
Show answer & explanation
Correct answer: A
The in operator checks whether a value exists in a sequence such as a list, tuple, or string.
Loading lesson…