Class-20 for Loop Python (2)
Class-20 for Loop Python (2)
Python by Computer G
THE FOR LOOP
A for loop is used for iterating over a sequence (that is either a
list, a tuple, a dictionary, a set, or a string).
Example Print each fruit in a fruit list:
fruits = ["apple", "banana", "cherry"]
for x in fruits:
print(x)