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. inThe in operator checks whether a value exists in a sequence such as a list, tuple, or string.

  1. A.

    in

  2. B.

    or

  3. C.

    not

  4. D.

    is

Attempted by 2969 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.

Explore the full course: Hpsc Pgt Computer Science

Loading lesson…