# Loop continuously
while True:
# Get the input
myvar = raw_input()
# When converted to lowercase, if the input equals "quit"...
if myvar.lower() == "quit":
# ...break the loop
break
# If we get here, then myvar.lower() != "quit"
# So, print the input
print myvar
只要改变顺序。你知道吗
我会使用
while True:
循环,然后在myvar.lower() == "quit"
时中断它:相关问题 更多 >
编程相关推荐