how to end code
bit of a basic question, apologies in advance
I'm working on a text based adventure game in python and I've created a function "death()" that is called upon whenever the user makes a choice that leads them to death. The code is as follows:
quit() returns the phrase "repl process died unexpectedly." Is there any way to end the code completely without this popping up?
You can import sys at the top like :
And then exit in the
def death(): print("You ded :|") sys.exit()