Basics II 4. Loops
Loops
Loops repeat a block of code for each item in an iterable.
for loops
words = ["read", "code", "repeat"]
for w in words:
print(w)
for w in words:
if "e" in w:
print(w)
while loops
count = 0
while count < 3:
print(count)
count += 1