1. Home
  2. Data Science
  3. Python
  4. What does the is operator check for when comparing two…

Added 5 May 2024

What does the is operator check for when comparing two variables in Python?

  1. Value equality
  2. Reference equality Correct answer
  3. Data type equality
  4. Memory location equality

Correct answer

B. Reference equality

18 views

MCQSEXAM

Explanation

The is operator checks whether two variables refer to the same object in memory.

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs