CBSE Class 11 Computer Science Question 24 of 82

Lists in Python — Question 4

Back to all questions
4
Question

Question 4

Which operator can be used with list?

  1. in
  2. not in
  3. Both 1 & 2
  4. Arithmetic Operators only
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.