for i in range(0,5):
print(i)
0
1
2
3
4
for i in range(5,10):
print(i)
5
6
7
8
9
for i in range(1,6):
print(i+1)
2
3
4
5
6
for i in range(1,6):
print(f"{i} x 10 = {ix10}")
1 x 10 = 10
2 x 10 = 20
3 x 10 = 30
4 x 10 = 40
5 x 10 = 50
text = "fez"
for i in range(0, len(text)):
print(i)
0
1
2
text = "fez"
for i in range(0, len(text)):
print(text[i])
f
e
z
text = "fez"
for i in text:
print(i)
f
e
z
text = "fez"
for i in text:
print(str(i)+"x")
fx
ex
zx
text = "fez"
for i in range(0, len(text)):
print(f"letter {i+1} is {text[i]}.")
letter 1 is f.
letter 2 is e.
letter 3 is z.
text = "fez"
letters = []
for i in text:
letters.append(i)
print(letters)
["f", "e", "z"]