samedi 7 mars 2020

What is the correct syntax for a nested if statement in Python?

If I have the following code

if k=="*":
    match()

    if k1 ==1:
        match()

        if k2==1:
            match()

            if k3==1:
                match()

                if k4=="*":
                    match()

Where would I put the corresponding else for each if statement?

Aucun commentaire:

Enregistrer un commentaire