New course! Every coder should learn Generative AI!
Try a free lesson+ 2
which function can be used to terminate a program
4 Answers
+ 6
import sys
sys.exit()
just exit() might work as well (can't test)
+ 4
exit(0)
+ 3
quit()
+ 1
Both exit() and quit()