Clear screen in shell

josh picture josh · Sep 21, 2013 · Viewed 337.8k times · Source

Just a quick question:
How do you clear the screen in shell? I've seen ways like:

import os
os.system('cls')

This just opens the windows cmd, clears the screen and closes but I want the shell window to be cleared
(PS: I don't know this helps, but I'm using version 3.3.2 of Python)
Thank you :)

Answer

Shafiq picture Shafiq · Aug 7, 2015

What about the shortcut CTRL+L?

It works for all shells e.g. Python, Bash, MySQL, MATLAB, etc.