Discuss / Python / 作业 我用了while ,感觉for更简单

作业 我用了while ,感觉for更简单

Topic source

L=['hehe','haha','heihei','ooo'] t=len(L) while(t>0): print('hello,%s' %(L[t-1])) t=t-1

cnzaobao

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

是的用for 简单但你的可以复习其它的东西,挺 不错的。

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

  • 1

Reply