0
Please can anyone put me through
>>> 1 != 1 why is it false False >>> "eleven" != "seven" why is it ture True >>> 2 != 10why is it ture True
3 Answers
+ 5
!= means 'not equal'
1!=1 means 1 is not equal to 1 which is False
+ 4
The first one compares two integers. 1 is equal to 1, so the condition is false. Second one compares two strings, they are not identical, so - true. Third one compares 2 integers - they are not identical, so the condition to be "different" is true.
+ 2
Thanks