Horje
clear window python console Code Example
how to clear the console python
def clear(): 
  
    # for windows 
    if name == 'nt': 
        _ = system('cls') 
  
    # for mac and linux(here, os.name is 'posix') 
    else: 
        _ = system('clear') 
clear console in python
As you mentioned, you can do a system call:

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

For Linux the lambda becomes
>>> clear = lambda: os.system('clear')
clear window python console
import os
clear = lambda: os.system('cls')




Python

Related
convert 2d string array to float python Code Example convert 2d string array to float python Code Example
python cache return value Code Example python cache return value Code Example
python print error output Code Example python print error output Code Example
how to remove duplicate files from folder with python Code Example how to remove duplicate files from folder with python Code Example
anaconda python 3.6 download Code Example anaconda python 3.6 download Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7