📜  如何在python代码示例中停止程序

📅  最后修改于: 2022-03-11 14:46:21.155000             🧑  作者: Mango

代码示例3
# Do stuff
stop = input("Would you like to stop the program? ")
if stop == "y":
  exit()
else:
  # do stuff