Vidyalelo
Python · Q38

Python MCQs: Variable Names and Operators Chapter

Programming · Python · question 38

Q38

What does the is operator test for?

A.
Equality of values
B.
Identity of objects
Answer
C.
Comparison of strings
D.
Inclusion in a list

Answer: Option B

Solution

Answer: Option B
Solution:
The is operator tests whether two variables refer to the same object in memory.