0

I'm working on a tictactoe game and the output gets really messy and untidy after some inputs by the user, so is there any library or something I can use to clear the output screen after some time. The only method I know of works only for jupyter notebook. I'm using pycharm.

quamrana
  • 33,740
  • 12
  • 54
  • 68
Logic
  • 13
  • 8

2 Answers2

0
import os

os.system("cls")

cls would be clear on mac or linux This should clear console

deateaterOG
  • 61
  • 1
  • 9
0

I think you can use the OS library and run clear command

import os

os.system("clear")