In python, the difference between ==and is, is that ==compares [...] while is compares [...] (NOTE: looking for two different words here)
Answer
==,equality (i.e. two objects are pointing not to necessarly the same object but what they do point to is of equal value) is, identity (i.e. two object have same value and are same/point to same thing
Question
In python, the difference between ==and is, is that ==compares [...] while is compares [...] (NOTE: looking for two different words here)
Answer
?
Question
In python, the difference between ==and is, is that ==compares [...] while is compares [...] (NOTE: looking for two different words here)
Answer
==,equality (i.e. two objects are pointing not to necessarly the same object but what they do point to is of equal value) is, identity (i.e. two object have same value and are same/point to same thing
If you want to change selection, open document below and click on "Move attachment"
The Difference Between “is” and “==” in Python – dbader.org in meaning between equal and identical. And this difference is important when you want to understand how Python’s is and == comparison operators behave. The == operator compares by checking for <span>equality: If these cats were Python objects and we’d compare them with the == operator, we’d get “both cats are equal” as an answer. The is operator, however, compares identities: If we compared
Summary
status
not learned
measured difficulty
37% [default]
last interval [days]
repetition number in this series
0
memorised on
scheduled repetition
scheduled repetition interval
last repetition or drill
Details
No repetitions
Discussion
Do you want to join discussion? Click here to log in or create user.