#FOR LOOP
#A for loop is used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string).
#This is less like the for keyword in other programming languages, and works more like an iterator method as found in other object-orientated programming languages.
#With the for loop we can execute a set of statements, once for each item in a list, tuple, set etc.
#list
numbers=[1,2,3,4,5]
#for loop iterates once for each item in a list
for num in numbers:
print(num)
#break is used to terminate the loop
for num in numbers:
if num == 3:
print('found the number')
break
print(num)
#continue statement rejects all the remaining statements in the current iteration of the loop and moves the control back to the top of the loop
for num in numbers:
if num == 3:
print('found the number')
continue
print('this will never get prints')
print(num)
#range(start,end) #end value doesn't get included
for i in range(1,11):
print(i)
#range(start,end,step)
for i in range(1,11,3):
print(i)