1. Home
  2. Data Science
  3. Python
  4. What does the is operator check in Python?

Added 25 Nov 2026

What does the is operator check in Python?

  1. Whether two values are equal
  2. Whether two variables reference the same object Correct answer
  3. Whether a value is of a given type
  4. Whether a value is None only

Correct answer

B. Whether two variables reference the same object

10 views

MCQSEXAM

Explanation

is compares object identity, while == compares values.

Reference

Asked in: Python Interview Data Types

https://docs.python.org/3/library/stdtypes.html

Preparing for an exam?

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