How can I clear screen in python cmd?

5.6k views Asked by At

How can I clear the screen from former results in python cmd? I want to clear the screen in each level of a loop, I mean how to clear the results and print the new one instead of that?

1

There are 1 answers

4
DadaArno On BEST ANSWER

This ?

 >>> import os
 >>> clear = lambda: os.system('cls')
 >>> clear()