It would be good if instead of just ending we put in a chance for the user to respond to an "are you sure you want to quit" message.
In Python you can import sys - or system commands. Then we can use sys.exit() to quit the program.
At the top of your code
Then we can write a routine to respond to the user choosing the quit option.
Think about how to make this work with a question that gives them the chance not to quit.
You will need to get input from the user probably Y or N or something similar - Then use an IF statement to decide on what the input means - if it it Y then go ahead and quit - if not then perhaps display your menu again and continue.