+ 1
When i will print (3!=6) it shows true....... But when i will print (3!=8) it also shows true............How it's possible
I will not understand that concept
6 Answers
+ 4
!= is a logical operator which means different, so:
3 is different of 6 = true
3 is different of 8 = true
+ 3
false
Correct!
+ 1
is it true now
+ 1
The "!=" is logical operator that give us true when both values are different. 3!=6 is true because 3 is not (!) equal (=) and to 6. If both values are equals give us false
0
print (3!=3) gives False. Because the condition is not true.