Vidyalelo
Python · Q10

Python MCQs: Variable Names and Operators Chapter

Programming · Python · question 10

Q10

What does the 'not in' operator do in Python?

A.
Checks if two values are equal
B.
Checks if a value is greater than another
C.
Checks if a value is not in a sequence
Answer
D.
Checks if a value is in a sequence

Answer: Option C

Solution

Answer: Option C
Solution:
The not in operator checks if a value is not present in a sequence.