0

Assuming evaluation happens left to right,

if (condition1 and condition2):
    .....

If condition1 returns False whether condition2 will be evaluated or not? Since, either (False and True) or (False and False) always going to be False.

Actually I have two questions,
1. Evaluation happens left to right or other way?
2. Whether all conditions will be evaluated in all scenarios?

For example,

if (5==6 and 100==200):
    pass
else:
    pass

100==200 and 5==6 both will be evaluated or not?

WoodChopper
  • 4,265
  • 6
  • 31
  • 55

0 Answers0