Learn practical skills, build real-world projects, and advance your career
Created 4 years ago
LOOPS
Loops can execute a block of code number of times until a certain condition is met. Their usage is fairly common in programming.
For Loops
colors = ['red','blue','pink','black','yellow']
for color in colors:
print(color)
red
blue
pink
black
yellow
fruit = 'Watermelon'
for i in fruit:
print(i)
W
a
t
e
r
m
e
l
o
n