def loop1():
s = getinput()
while len(s) >0 :
print s
s = getinput()
def loop2():
s = getinput()
while len(s) >0 :
s = getinput()
print s
...全文
1364打赏收藏
python函数
假设getinput()是获取用户在console输入的数字,下面的2个循环,有什么不同? def loop1(): s = getinput() while len(s) >0 : print s s = getinput() def loop2(): s = getinput() while len(s) >0 : s = getinput() print s