for in loop skipping parts using continue
- continue
txt = 'hello world'
for ch in txt:
if ch == ' ':
continue
print(ch)
print("done")
h
e
l
l
o
w
o
r
l
d
done
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
txt = 'hello world'
for ch in txt:
if ch == ' ':
continue
print(ch)
print("done")
h
e
l
l
o
w
o
r
l
d
done