Examples of for loop in Python programming
All Contributions
print list contents in python using for loop
fruits = ["apple", "banana", "cherry"]
for x in fruits:
print(x)
print english letters in small case
#print all english small letters
for i in range(97,123):
print(chr(i))
total contributions (14)
using break statement, go out from loop when reaching the element "banana" in the fruit's list