首先是while方法:
L = ['Bart','Lisa','Adam'] a = 0 while a < len(L): print('Hello,%s!'%L[a]) a += 1
然后是for方法:
L = ['Bart','Lisa','Adam'] for i in L: print('Hello,%s!'i)
Sign in to make a reply
鲜血与鲜花_
首先是while方法:
然后是for方法: