All mock tests are FREE till 31 December — register to save your progress
Unit 3 · Programming Concepts & Python HTET 2024 PGT Computer Science · 30 July 2025

In Python "==" operator returns true if :

पायथन में "==" ऑपरेटर सत्य देता है यदि :

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: B. Content of two different objects are sameदो भिन्न ऑब्जेक्ट्स के कंटेंट समान हैं

Explanation

== compares values (equality), so it is True when two different objects have the same content: [1, 2] == [1, 2]. Testing whether two names are aliases for the same object is the job of 'is'. (== is also True for aliases, but the expected answer separates the two operators.)

== मानों की तुलना करता है, इसलिए दो अलग ऑब्जेक्ट्स का कंटेंट समान होने पर True देता है: [1, 2] == [1, 2]। दो नाम एक ही ऑब्जेक्ट के उपनाम हैं या नहीं — यह 'is' जाँचता है। (उपनाम होने पर भी == True होगा, पर प्रश्न दोनों ऑपरेटरों का अंतर पूछ रहा है।)

More Programming Concepts & Python questions