how to use the for loop in python code example
Example 1: how do i make a for loop in python
for i in range(0, 10):
#do stuff
pass
Example 2: python for loop
for i in range(5):
print(i)
# Output:
# 0
# 1
# 2
# 3
# 4
my_list = ["a", 1, True, 4.0, (0, 0)]
for i in my_list:
print(i)
# Output:
# a
# 1
# True
# 4.0
# (0, 0)