+ 1

About the (not) function

is adding not before a string or a line of code prints it in opposite ways example print ( not 9==9) the out put came out as false so is it correct or there is something that I didn't understand just yet

9th May 2017, 7:53 AM
ldld
2 Answers
+ 5
"not" have many uses in Python your example uses it as a Logical NOT which inverses the result so 9==9 returns true --> NOT(true) --> false https://www.tutorialspoint.com/python/logical_operators_example.htm some basic operations in general (you can find more uses of not as well) https://www.tutorialspoint.com/python/python_basic_operators.htm
9th May 2017, 8:01 AM
Burey
Burey - avatar
+ 19
Yes...
9th May 2017, 7:55 AM
Valen.H. ~
Valen.H. ~ - avatar