[Solved] Conditional Statement in python [closed]


Multiple conditional statements in Python can be done as follows:

if condition1:
    statement
elif condition2:
    statement
elif condition2:
    statement
else:
    statement

Or if you wanted nested conditional statements:

if condition1:
    if condition2:
       if condition3:
           statement
       else:
           statement
    elif condition4:
       if condition5:
           statement
       else:
           statement

(This is just one example of some nested conditional statements)

0

solved Conditional Statement in python [closed]