Discuss / Python / 交作业

交作业

Topic source

iLiliP

#1 Created at ... [Delete] [Delete and Lock User]

分别用for...in和while实现

L = ['Bart', 'Lisa', 'Adam'] for name in L : print('Hello,',name)

L = ['Bart', 'Lisa', 'Adam'] n=0 while n <3 : print('Hello,',L[n]) n=n+1


  • 1

Reply