Using sys.exit or SystemExit; when to use which?

No practical difference, but there’s another difference in your example code – print goes to standard out, but the exception text goes to standard error (which is probably what you want).

Leave a Comment