Q. What does sys.exit() do?

A
Pauses execution
B
Terminates the program
C
Restarts the script
D
Clears memory
Solution:

sys.exit() terminates the Python program, optionally with an exit code.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!

    [honeypot honeypot-100]