+ 3
Could anyone explain how is and is not operator works in python?
3 odpowiedzi
+ 7
This code might explain you it.
https://code.sololearn.com/cVE2qBCAXVep/?ref=app
+ 5
"is" mean is the memory address of the value... if a=b, possibly "a" and "b" addresses the same... we can say (a is b) absolutely True...
but for example a=[1,2,3,4] and b=[1,2,3,4] looks like the same list... (a == b) absolutely True... "a" named list created different memory allocation than "b" named list... They took the same named items but lists memory addresses different each other. because of this reason (a is b) absolutely False.
0
Thanks a lot ⚒️Raj Chhatrala🛡️