State difference between none and none in python
Answers
Answered by
1
None is a singleton object (there only ever exists one None ). is checks to see if the object is the same object, while == just checks if they are equivalent. But since there is only one None , they will always be the same, and is will return True. It depends on what you are comparing to None.
Answered by
1
Answer:
here is ur answer dude
Explanation:
None is a singleton object (there only ever exists one None ). is checks to see if the object is the same object, while == just checks if they are equivalent. But since there is only one None , they will always be the same, and is will return True. It depends on what you are comparing to None.
hope it helps
Similar questions