Discuss / Python / PRINT OUT THE NAME

PRINT OUT THE NAME

Topic source

while

L = ['Bart', 'Lisa', 'Adam']
a=0
while a<len(L):
    print('hello',L[a])
    a=a+1

for

L=['BART','LISA','ADAM']
x=0
for x in range(len(L)):
    print('hello, '+L[x])
L=['BART','LISA','ADAM']
for name in L:
    print('hello, '+name)

  • 1

Reply