#simple for loop to print numbers 1-99 inclusive
for i in range(1,100):
print(i)
#simple for loop to loop through a list
fruits = ["apple","peach","banana"]
for fruit in fruits:
print(fruit)
1
0
jak používat smyčku pro v Pythonu
a_list = [1,2,3,4,5]
#this loops through each element in the list and sets it equal to x
for x in a_list:
print(x)