# how to use for in python for (range, lists)
fruits = ["pineapple","apple", "banana", "cherry"]
for x in fruits:
if x == "apple":
continue
if x == "banana":
break
print(x)
# fron 2 to 30 by 3 step
for x in range(2, 30, 3):
print(x)
adj = ["red", "big"]
fruits = ["apple", "banana"]
for x in adj:
for y in fruits:
print(x, y)
#output: red apple, red banana, big apple, big banana
n=int(input("donner n:"))
p=1
for i in range(1, n):p=p*i
print('P=',p)
values = ["a", "b", "c", "d", "e", "f"]
for value in values:
print(value)
num_list = range(10)
for num in list:
print(num)
# Measure some strings:
words = ['cat', 'window', 'defenestrate']
# loop over words
for w in words:
print(w, len(w))
# output
cat 3
window 6
defenestrate 12