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?
            Asked
            
        
        
            Active
            
        
            Viewed 5,584 times
        
    1 Answers
2
            This ?
 >>> import os
 >>> clear = lambda: os.system('cls')
 >>> clear()
 
    
    
        DadaArno
        
- 193
- 2
- 16
- 
                    What on earth is ``cls``? ``^L`` ftw – James Mills Jun 03 '15 at 10:57
- 
                    This is clear console command in Windows. Function system() directly executes shell commands https://docs.python.org/2/library/os.html#os.system – fsacer Jun 03 '15 at 10:59
- 
                    **CL**ear **S**creen – Songy Jun 03 '15 at 11:00
- 
                    4If you use unix, use `clear` instead of `cls` – DadaArno Jun 03 '15 at 11:01
 
    