1
1
Fork 0
PythonLearning/Idk tbh/I have no clue

7 lines
323 B
Text
Raw Normal View History

Nested conditional
if x > 10:
if y > 10:
result = "Both greater"
else: result = "x is greater"
else: result = "x is not greater" # Equivalent single conditional if x > 10 and y > 10: result = "Both greater" elif x > 10: result = "x is greater" else: result = "x is not greater"
function