func to stop program python code example
Example 1: python sys halt
import sys
#put your code here
sys.exit
Example 2: stop function python
def some_fuction():
print("This is all I do!")
return
# A simple return will end a function
import sys
#put your code here
sys.exit
def some_fuction():
print("This is all I do!")
return
# A simple return will end a function