Is there a method that tells my program to quit?

后端 未结 5 1016
不知归路
不知归路 2020-12-25 10:21

For the \"q\" (quit) option in my program menu, I have the following code:

elif choice == \"q\":
    print()

That worked all right until I

5条回答
  •  有刺的猬
    2020-12-25 11:10

    See sys.exit. That function will quit your program with the given exit status.

提交回复
热议问题