1#x starts at 1 and goes up to 80 @ intervals of 2
2for x in range(1, 80, 2):
3 print(x)
1#simple for loop to print numbers 1-99 inclusive
2for i in range(1,100):
3 print(i)
4
5#simple for loop to loop through a list
6fruits = ["apple","peach","banana"]
7for fruit in fruits:
8 print(fruit)
1# Python for loop
2
3for i in range(1, 101):
4 # i is automatically equals to 0 if has no mention before
5 # range(1, 101) is making the loop 100 times (range(1, 151) will make it to loop 150 times)
6 print(i) # prints the number of i (equals to the loop number)
7
8for x in [1, 2, 3, 4, 5]:
9 # it will loop the length of the list (in that case 5 times)
10 print(x) # prints the item in the index of the list that the loop is currently on