python - How to fix the menu selection for quiting -
so want run when number 7 entered should quit current program. have tried rest of menu selection want fix quit @ moment.
if menu_selection == "7": quit()
i assuming guessing quit()
way exit. should try sys.exit()
:
import sys # @ head of program ... program ... if menu_selection == "7": sys.exit()
Comments
Post a Comment