How is 19<=19 True?


As obvious, 19 is equal to 19 i.1., 19 ==19 and some how the program results an error. Can anyone explain the reason why it is true.


You absolutely MUST space out the terms. Otherwise, the syntax will have an error. Try this: "9 == 9"


if still need help post full code please



That statement is completely incorrect. There is a convention for coding style of Python , though in no way do you have to follow it. If coding 19==19 throws a syntax error for you then there is something else causing the problem.

It is true that python requires at least one space between words in order to decipher what we are telling it to do, but that same requirement is not true of operators such as >, <, = ect...

Also a an note none of the following if statements follow the Pep, so try not to code like that for your own sanity.


x = 1 #WORKS
y=2 #WORKS
if x < 2: print(True) #WORKS
if x<2:print(True) #WORKS
ifx<2:print(True) # DOES NOT WORK


Oh OK then, I had not realized that as I thought the space punctuation was taken too seriously. Thank You.