This question already has an answer here:
- Does Python support short-circuiting? 3 answers
I am wondering what the order of operations is in my if statement.
if not myBool and myFunc():
# do something
pass
in the above code, if the myBool variable is true, will the if statement stop there and not run the myFunc() function or will both of them be checked/ran irregardless?
ANSWER: the function will not be ran
Aucun commentaire:
Enregistrer un commentaire