In Python .......... operator is used to determine the element's presence or…

2024

In Python .......... operator is used to determine the element's presence or absence in list.

  1. A.

    find

  2. B.

    in

  3. C.

    search

  4. D.

    lookup

Attempted by 1293 students.

Show answer & explanation

Correct answer: B

Explanation

The 'in' operator is used to check if a value exists within a sequence like a list.

It returns True if the element is present and False if it is absent.

Example: 'x' in ['a', 'b'] evaluates to True.

Explore the full course: Hpsc Pgt Computer Science