0
For loop
what is the use of for loop in python
1 Answer
0
#Use 1: for doing a set of instructions a certain amount times
#Use 2: for iterating through a list
#examples:
#use 1:
for i in range(3):
print("hello")
#use 2:
list = ["orange", "apple", "banana", "kiwi"]
for i in list:
print(i)