In windows commnad line we use "cls" to clear screen.
But there is no strait forward command to clear console screen in python.
To have command like that we need to import "OS" module. Let us see how to do so,
Go to Python Command Line :
>>>import os >>>cls = lambda: os.system('cls') >>>cls()
Now it is registered with python. Now lets see how to use it in pythong window.
>>> # clear screen demo ..... print("dotnetqueries") dotnetqueries >>> cls() >>> # this will clear screen
Here, you can use this command until open window session is alive.
That means once you close the window and reopen it this command will not work.
Again you need to register it to use.