Discuss / Python / 循环

循环

Topic source

L = ['Bart', 'Lisa', 'Adam']

for name in L:

  print('hello,',name,'!')

n=0

while n<3:

  print('hello',L[n],'!')

  n=n+1


  • 1

Reply