1# A loop is used to iterate over a sequence
2# The format of a loop is
3for variable in object:
4 pass
5
6# A common use of a for loop is using the range() function
7for num in range(1, 10):
8 print(num)
9
10# It can also be used with a list
11new_list = ["Number 1", "Number 2", "Number 3", "Number 4"]
12for x in new_list:
13 print(x)
1# Python program to illustrate
2# while loop
3count = 0
4while (count < 3):
5 count = count + 1
6 print("Hello Geek")
7