how to loop on python code example
Example 1: python for loop
for x in (list):
print(x)
Example 2: python for loop range
for i in range(0, 3):
print(i)
Example 3: for loop example python 3
for num in nums:
for letter in 'abs':
print(num, letter)
Example 4: python loop program
digits = [0, 1, 5]
for i in digits:
print(i)
else:
print("No items left.")