I am creating a big program, so first there is a cmd var that asks for an input but when I type in snake_game it runs the problem is whenever the whole snake game ends the whole program ends like the cmd var ends. Here is the GitHub.
I want for when the program ends, the cmd appears again, so the user can keep typing other commands
I have tried calling sys.exit() but that ends up with the same result, and I have also tried looping the game then calling a break when the game ends. But the loop just does not work because it is called within the def() function. So I have no clue honestly of what to do now.