get function python for loop code example
Example 1: for loop python
Python Loops
for x in range(1, 80, 2):
print(x)
words=['zero','one','two']
for operator, word in enumerate(words):
print(word, operator)
for x in range(1, 80, 2):
print(x)
Example 2: python for loop
my_list = ["milk", "coffee", "bread"]
# i stands for iterator
for i in my_list:
print(i) # prints every element of my_list