Loops let you repeat code. Python supports for and while loops.
for
while
for i in range(5): print(i)
range(n) generates numbers from 0 to n-1.
range(n)
count = 0 while count < 5: print(count) count += 1
Be careful with while loops to avoid infinite loops.