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?

  1. A.

    in

  2. B.

    or

  3. C.

    not

  4. D.

    is

Attempted by 2651 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: Rssb Senior Computer Instructor