for and while

for

1
2
3
4
5
6
7
8
9
10
11
L = ['Bart', 'Lisa', 'Adam']
for l in L:
print(l)



L = ['Bart', 'Lisa', 'Adam']
l = 0
while l <= 2:
print(L[l])
l = l+1