Vidyalelo
Python · Q9

Python MCQs: Variable Names and Operators Chapter

Programming · Python · question 9

Q9

What does the '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 in a sequence
Answer
D.
Checks if a value is not in a sequence

Answer: Option C

Solution

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