Loops or (control statement) in any language are used to execute a block of code.Loops make a work very easy.We can do complex work in easy form.
Loops are generly 3 types-
1.for loop
2.while loop
3.do while loop(Python dose not support)
For Loop
For loop is repetition control structure that allow us to write a code that we need to execute a specific numbers of time.For loop is useful when we know that how many times a task will be repeated.
for (variable_name) in (range):
for i in range(1,6): print(i)
output:-
1
2
3
4
5