I am aware of the die() command in PHP which exits a script early.
die()
How can I do this in Python?
Another way is:
raise SystemExit