how to do loops in python code example
Example 1: python loops
for x in range(1, 80, 2):
print(x)
Example 2: python for loop
for x in (list):
print(x)
Example 3: python for loop range
for i in range(0, 3):
print(i)
Example 4: for in python
fruits = ["pineapple","apple", "banana", "cherry"]
for x in fruits:
if x == "apple":
continue
if x == "banana":
break
print(x)
for x in range(2, 30, 3):
print(x)
Example 5: python loop
for i in range(1, 10);
print(i)
Example 6: how to do a for loop python
print(range(4))
>>> [0,1,2,3]
print(range(1,4))
>>> [1,2,3]
print(range(2,10,2))
>>> [2,4,6,8]