Clearing IDLE's shell for Python
So I'm doing an MIT OCW assignment where I am creating a functional game of hangman. I got everything working. In IDLE, I have to hit F5 to run the code in the shell. I don't know any other way to run it, but that's not the big deal to me.
The main problem: the shell gets absolutely full of responses. It just keeps stacking up with more and more output. So, my question. Is it possible to put in a piece of code to clear the shell? Or do I just have to deal with it for now?
EDIT: To clarify: I need the prints for each cycle. Every time the user guesses a letter, it prints something like this:
2 guesses remaining
Possible answers: abdfghijkpquvwxyz
Guess a letter:g
That letter is not in the word!
_ o_ _ _ tr_
I just want to know if there is a way I can clear what is in the shell before the next 'cycle' is printed.
You can close it and just open a new one when you want to run the program or run it from the terminal and use use clear after you exit the shell