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
  • 37,849
  • 12
  • 53
  • 71
Logic
  • 53
  • 1
  • 9

2 Answers2

0
import os

os.system("cls")

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

deateaterOG
  • 111
  • 1
  • 3
  • 9
0

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

import os

os.system("clear")
Badrelden Ahmed
  • 106
  • 2
  • 5