KnowledgeBoat Logo
|

Informatics Practices

Which operator can be used with list?

  1. in
  2. not in
  3. Both 1 & 2
  4. Arithmetic Operators only

Python List Manipulation

3 Likes

Answer

Both 1 & 2

Reason — The operators in and not in can both be used with lists in Python. The in operator checks if an element is present in the list, while the not in operator checks if an element is not present in the list.

Answered By

3 Likes


Related Questions