Answers for "python and how to clear screen on windows"

28

clear screen python

Import os
 
os.system("clear") # Linux - OSX
os.system("cls") # Windows
Posted by: Guest on April-05-2020
10

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')
Posted by: Guest on March-07-2020

Code answers related to "python and how to clear screen on windows"

Python Answers by Framework

Browse Popular Code Answers by Language