-4
如果我有这样的代码:是否可以在Python中停止程序?
a=input('#something')
while True:
if a == 0:
#Stop the program here
我将如何结束程序?
感谢
如果我有这样的代码:是否可以在Python中停止程序?
a=input('#something')
while True:
if a == 0:
#Stop the program here
我将如何结束程序?
感谢
'Ctrl + C'在终端。 – Prajwal
终端中的CTRL C,Linux中的CTRL D,CTRL Z等 – RafaelC
如果你真的只想退出循环,那就是'break'。 – Ryan