For example, I’m trying to make a game and at the end of the game, I ask the player if they want to play again. If ‘yes’, I want the console to clear and the program to start from the beginning. How do I go about doing this correctly? Or if clear()
doesn’t work in pycharm, how can I just restart the program?
I’ve tried using the os.systm('clear')
(I’m using macOS) function and added TERM as an environmental variable, but I still get the error: TERM environment variable not set
. (I’m doing all this on Pycharm)
Sheil Patel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.