Clearing python Shell

I am new to python… can anyone help me to use function how to clear python Shell… like using function system(“cls”) or clrscr()…

http://stackoverflow.com/questions/1432480/any-way-to-clear-python-shell

I’m on a GNU/Linux system.

import os
os.system('clear')

is one way to do it here, but let’s face it - that’s way too much typing just to clear the screen on occasion, so I just press Ctrl+L. :slight_smile:

This works fine when running python interactively, using ipython, and in many other applications that can be run from within a *NIX terminal emulator. It probably won’t work with IDLE, since that’s a Tk app.

Hell I just use it for quickie testing of something, so I ctrl-d and then usually close that terminal window :stuck_out_tongue:

That is a bit much typing for my taste

If you are using python IDE in the windows os.system(‘CLS’) this code might help you to achieve the task.
AS the linux is concerned the import os os.system(‘clear’) can be used.