+ 2

How to add Boolean conditions in Python?

like In C we do if( h==0 || h==1) && g==0 {bunch of statements }

15th Jan 2017, 5:29 PM
Shirious
Shirious - avatar
2 Answers
+ 3
The above isnt following order of operations if ((h == 1 or h == 2) and g == 0): func() if x: func() if y: func2()
15th Jan 2017, 7:56 PM
Robert Kavanaugh
+ 1
thnx I will try both
16th Jan 2017, 12:10 PM
Shirious
Shirious - avatar