I've been attempting to teach myself Python for a few months now. I have definantly made some progress and am really enjoying the language! Recently, I have been designing a Tic-Tac-Toe game using ASCII characters. The program works, so now I am doing some cleanup to the code. After searching the internet for a bit I cant seem to find any command that clears the screen.
Here is what happens right now:
Every time a player inputs where they wish to place their 'X' or 'O', I have a command called printBoard that prints the new board onto the screen. This is fine, but obviously, after two turns you have the old boards still on the screen.
My question is, is there a command that I can place into my program that clears the screen BEFORE a new board is printed? That way the interface is not clogged up with old instances of the playing board.
So far this is all I can think of.
def clear(): for i in range(60): print()
Any help would be appreceated!