break/exit script

前端 未结 8 1247
Happy的楠姐
Happy的楠姐 2021-01-30 15:22

I have a program that does some data analysis and is a few hundred lines long.

Very early on in the program, I want to do some quality control and if there is not enou

8条回答
  •  梦毁少年i
    2021-01-30 16:00

    Perhaps you just want to stop executing a long script at some point. ie. like you want to hard code an exit() in C or Python.

    print("this is the last message")
    stop()
    print("you should not see this")
    

提交回复
热议问题