how to loop a function in python code example
Example 1: pytho loops
for x in loop:
print(x)
Example 2: 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 3: for in python
for i in range(1,10,2):
print(i);
for i in range (1,4):
print(i);
for i in range (5):
print (i);
python = ["ml","ai","dl"];
for i in python:
print(i);
for i in range(1,5):
pass;
Example 4: python for loop
a = 10
for i in range(1, 10)
print(i)
Example 5: python for loop
A for loop iterates through an iterable, may that be an array, a string, or a range of numbers
myArr = ["string 1", "string 2"]
for x in myArr:
print(x)
Example 6: python for loop
words=['zero','one','two']
for operator, word in enumerate(words):
print(word, operator)