Discuss / Python / zuoye

zuoye

Topic source
#for
L = ['Bart', 'Lisa', 'Adam']
for x in L:
    print('hello,%s'%x)
#while
L = ['Bart', 'Lisa', 'Adam']
n=0
while n<=2:
    print('hello',L[n])    
    n=n+1

  • 1

Reply