how to make loop python code example
Example 1: python loops
for x in range(1, 80, 2):
print(x)
Example 2: how to make loop python
loop = True
while loop:
print('Loop Worked')
Example 3: python for loop
items = ["Item1", "Item2", "Item3", "Item4"]
for i in range(len(items)):
print(items[i])
for item in items:
print(item)
Example 4: loop in python
print("INCREMENTED FOR LOOP")
for i in range(0, 5):
print(i)
print("\n DECREMENTED FOR LOOP")
for i in range(4, -1, -1):
print(i)
Example 5: python for loop
for number in range(10):
print(number)
Example 6: python for loop
my_list = ["milk", "coffee", "bread"]
for i in my_list:
print(i)