for i in L: print ("Hello, %s!" %i)
n=0 while n<len(L): print('Hello, %s!' %L[n]) n=n+1
Sign in to make a reply
兔皮虎桦桦
用for循环实习
for i in L: print ("Hello, %s!" %i)
用while循环实现:
n=0 while n<len(L): print('Hello, %s!' %L[n]) n=n+1