Skip to main content

is and == in Python

 



a = [1,2,3]
b = [1,2,3]

#Example :-  A ke pass Oppo f1s ha aur B ke pass bhi Oppo f1s ha   mobile(value) to same hai
                   # but mobile owner(valueholder) same nahi ha.
                   # So Here == to mean they have same Mobile
                   # And 'is' mean their are two owner
print(a==b)
print(a is b)



Comments