MCQs>IT & Programming>Python>What is the difference between the two methods, 'foo is None', and 'foo == None', for the purposes of determining if the type of an object is None?
Python MCQs
What is the difference between the two methods, "foo is None", and "foo == None", for the purposes of determining if the type of an object is None?
Answer
Correct Answer: "is" always returns True if it compares the same object instance whereas the value returned by "==" is determined by the __eq__() method.
Explanation:
Note: This Question is unanswered, help us to find answer for this one