mercredi 1 juillet 2020

Python else without if condition [duplicate]

Why does the following problem not give an "else without if" error?

i = 0
while i < 3: 
    print i 
    i += 1
else: 
    print 0

Aucun commentaire:

Enregistrer un commentaire