how to write loops in python code example
Example 1: python loops
for x in range(1, 80, 2):
print(x)
Example 2: python loop
for variable in object:
pass
for num in range(1, 10):
print(num)
new_list = ["Number 1", "Number 2", "Number 3", "Number 4"]
for x in new_list:
print(x)
Example 3: how to use for loops python
for i in range(1,100):
print(i)
fruits = ["apple","peach","banana"]
for fruit in fruits:
print(fruit)
Example 4: python for loop
words=['zero','one','two']
for operator, word in enumerate(words):
print(word, operator)
Example 5: how do i make a for loop in python
for i in range(0, 10):
pass