samedi 4 septembre 2021

How can I 'continue' the outer most for loop when an if statement is satisfied?

How can I jump to the next value (not the next val) when the condition is satisfied?

Example:

lines = iter(open('something.txt', 'r'))
for value in lines:
    for val in value:
        if val == "!":
        #execute code
        #jump to next value      
            

Aucun commentaire:

Enregistrer un commentaire