-4

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?

braX
  • 11,506
  • 5
  • 20
  • 33
peltate
  • 11
  • 1
  • 3

1 Answers1

2

This ?

 >>> import os
 >>> clear = lambda: os.system('cls')
 >>> clear()
DadaArno
  • 193
  • 2
  • 16