+ 1
1! = 4 I do not get the !
4 Respuestas
+ 5
I think the right sintax is:
1 != 4
+ 2
sorry, yes your right
+ 2
! basically means "not" .. != means not equal
if 1 != 4:
True, 1 does not equal 4
if 1!= 1:
false, 1 does equal 1 and this asked if it was NOT EQUAL.. which it is, thus returning false
0
! implies "not". So if you put ! with 1, that means you are negating 1. Which itself is turning to false. != implies "not equal to", here in this case both the operators come together, i.e. 1 != 4 (1 is not equal to 4)