if statement with multiple conditions python code example
Example 1: how to list more than 1 condition in an if statement python
bool = True
str = 'Helo'
int = 9
if bool == True and str == 'Helo':
print('Hello World')
if bool == False or int == 9:
print('Success')
Example 2: python double condition if
if conditionA and conditionB:
print('and')
if conditionA or conditionB:
print('or')
Example 3: if else statement with multiple conditions python
if( (5 ** 2 >= 25) and (4 * 2 < 8) or (35 / 7 > 4) ):
print("Booleans make If more powerful!")