0

I want to clear the screen time to time using function in Pycharm. When I tried to run the commands continuously, the screen gets full and seems clumsy.

I've tried the following commands used for CMD Mode and it is not working with Pycharm.

def clear():
    os.system('cls')
Rashid 'Lee' Ibrahim
  • 1,357
  • 1
  • 9
  • 21
viththi
  • 161
  • 3
  • 9
  • Does this answer your question? [os.system('cls') doesn't clear the screen in Pycharm?](https://stackoverflow.com/questions/56306486/os-systemcls-doesnt-clear-the-screen-in-pycharm) – Grismar Feb 25 '20 at 00:12

1 Answers1

0

As far as I am aware, Pycharm has no clear screen for it's console.

Whenever you restart the script that is running, the console will be cleared.

You can also do something like this, print('\n'*80) # prints 80 line breaks, to emulate clearing the screen

Rashid 'Lee' Ibrahim
  • 1,357
  • 1
  • 9
  • 21