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
- A .......... is the specification of legal values for variable of the type.
- In Python .......... operator is used to determine the element's presence or absence in list.
- In Python, .......... is the type of sequence that resembles a list, except that, unlike a list, it is immutable.
- .......... is a set of rules for carrying out some calculation either by hand or by machine.
- Which procedure is characterized by the fact that the procedure calls itself again and again till the base condition is met?
- If a class contains at least one pure virtual function, it is called as ............. class.