simple for loop in python code example
Example 1: python loops
for x in range(1, 80, 2):
print(x)
Example 2: 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 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: for loop in python
for x in range(6):
print(x)
Example 5: python for loop
nums = ['one', 'two', 'three']
for elem in nums:
print(elem)