Python clear console three working commands try these

The following are three really tested and tried commands to clear the screen in Python. Also shown small video presentation where you can find two things

  1. How to use Python as calculator
  2. How to clear screen in Python

Even though, your python is installed on Linux, the “CLEAR” screen will not work in Python.

The below are crispy and clear commands to clear console in Python.


You can always print enough newlines to clear your view of the window:

print "\n" * 80


or use os.system to issue a command the shell/terminal/cmd will understand:

import os 

import os os.system("clear")

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.