for loop python uses code example
Example 1: python for loop
for item in ['mosh','john','sarah']:
print(item)
Example 2: for loop in python
data = [34,56,78,23]
sum = 0
# for loop is to iterate and do same operation again an again
# "in" is identity operator which is used to check weather data is present or not
for i in data:
sum +=i
print(sum)
Example 3: python for loop
for number_of_repeats:
code_to_run()