1#The (!) is the not operator in Python, (!=) means not equal to.
2if 2!=10:
3 print("2 isn't equal to 10.")
4elif 2=10:
5 print("2 is equal to 10.")
6#Prints "2 isn't equal to 10." as 2 isn't equal to 10. Is it?
1The == operator compares the values of both the operands and checks for value equality. Whereas is operator checks whether both the operands refer to the same object or not. ... Hence list1 and list2 refer to different objects. We can check it with id() function in python which returns the “identity” of an object.