Answers for "how to clear python shell terminal ?"

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
0

python cls command line

import os

if running_windows == True:
  os.system('CLS')
elif running_linux == True:
  os.system('clear')
Posted by: Guest on November-28-2020

Python Answers by Framework

Browse Popular Code Answers by Language