最佳答案
我见过有人在 Python 中建议使用 sys.exit ()。 我的问题是,是否有任何其他方式退出当前脚本的执行,我的意思是终止,一个错误。
就像这样:
sys.exit("You can not have three process at the same time.")
目前我的解决方案是:
print("You can not have three process at the same time.")
sys.exit()