O que aprendemos com while também funciona no for (continue, break, else, etc)

This commit is contained in:
Luiz Otávio
2022-10-28 12:18:13 -03:00
parent 16b37e5511
commit 75f3f24a65
2 changed files with 19 additions and 6 deletions

13
aula46.py Normal file
View File

@@ -0,0 +1,13 @@
for i in range(10):
if i == 2:
print('i é 2, pulando...')
continue
if i == 8:
print('i é 8, seu else não executará')
break
for j in range(1, 3):
print(i, j)
else:
print('For completo com sucesso!')