- 1
(False or False or False or True or False or False) = True - Why is Python so bloody optimistic?
Don't believe me? - then run this code > https://code.sololearn.com/cqoD5tWsk50m/#py How could this ever be useful? Has anyone got an example? P.S. - Yes, in school, most of my teachers didn't like me very much.
3 Respuestas
+ 4
It can be useful if you try to find if there is at least one occurence of a value in a set. Of course you then use "if a IN b" syntax but it essentially is a multiple OR check-up.
+ 2
You should learn to evaluate boolean expressions.
https://code.sololearn.com/c48CtJEIe9LJ/?ref=app
+ 1
@ Tobi
... and, in my example - how could that ever be useful?