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)
1words=['zero','one','two']
2for operator, word in enumerate(words):
3 print(word, operator)
1
2data = [34,56,78,23]
3sum = 0
4# for loop is to iterate and do same operation again an again
5# "in" is identity operator which is used to check weather data is present or not
6for i in data:
7 sum +=i
8
9print(sum)
10
11
12