0

What does "!=" mean? And how is it different than "=="?

4th Aug 2016, 3:01 AM
Marcelo Nader
Marcelo Nader - avatar
3 Answers
+ 4
!= means not equal to example: 1!=2 which means that 1 is not equal to 2 if you were to print it: print (1!=2) The output would be "True" because the statement is true (1 does not equal 2) If you were to do this: print (1!=1) The output would be False, since 1 does equal 1.
4th Aug 2016, 12:14 PM
David Trivic
David Trivic - avatar
+ 2
means not equal
5th Aug 2016, 2:14 PM
Shubham Kapoor
Shubham Kapoor - avatar
+ 1
'==' means not equal to or equal to example: '1==2' then the statement is false and when 2==2 then the statement is true
6th Aug 2016, 3:23 PM
Pradeep Gupta
Pradeep Gupta - avatar