I am new to python and I'm not sure about the rules of the if
condition:
Condition 1:
if 0:
Print "true"
output:
Condition 2:
if -1:
Print "true"
output: true
Condition 3:
if 1:
Print "true"
output: true
I will explain my code from,
Condition 1: It didn't print the statement, because it treated as false(boolean)
Condition 2: It print the statement, because it treated as true(boolean)
Why It is takes true, It is negative value(my assumption it takes only false) ?
Condition 3: It print the statement, because it treated as true(boolean).