Skip to main content
The 2024 Developer Survey results are live! See the results

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 3
    cls doesn't do anything on my OS X or nor on an Ubuntu server of mine. Some clarification could be good.
    – the
    Commented Sep 24, 2014 at 21:57
  • I think you should use clear for linux, or even better replace the print line instead of clearing the whole command line output.
    – Arijoon
    Commented Jan 21, 2015 at 1:01
  • 6
    this answer just copies another answer and adds a call to a deprecated function (os.system()) that launches a subprocess to clear the screen using a platform specific command (cls). How does this have any upvotes?? Utterly worthless "answer" IMHO. Commented Dec 11, 2015 at 19:56