lundi 21 décembre 2020

why doesn't elif work in this case in Python? [closed]

I am trying to implement somthing and i need such a nested structuer inside the first if there is another if and then if, elif, else where the first if has continue statement. but i am getting an error invalid syntax in elif and i dön't know why, if i replaced it with if it works or if I removeds = "soso" it also works. can someone help or explain? Thanks

 a = 4
for i in range(5):
    if(a != 2):
        if(a != 3):
            s ="fofo"
            if( a == 4):
                print(s)
                a = 5
                continue
            s ="soso"
            elif(a == 5):
                print(s)
            else :
                printt("nono")

Aucun commentaire:

Enregistrer un commentaire