How to clear screen in python?

Posted by Pinki | Updated on

How to clear screen in python?

An easier way to clear a screen while in python is to use Ctrl + L though it works for the shell as well as other programs. Command+K works fine in OSX to clear screen. Shift+Command+K to clear only the scrollback buffer. Subprocess allows you to call “cls” for Shell.

Create a file and copy paste below python program code to clear screen with the output.

Program Output

That’s all, I hope this helped you!

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers