SyntaxFix
Write A Post
Hire A Developer
Questions
To stop a python script using the keyboard: Ctrl + C
Ctrl
C
To stop it using code (This has worked for me on Python 3) :
import os os._exit(0)
you can also use:
import sys sys.exit()
or:
exit()
raise SystemExit