Answers for "even if i use clear command in python screen it does not work"

6

how to clear a command line python

import os

def clearConsole():
    command = 'clear'
    if os.name in ('nt', 'dos'):  # If Machine is running on Windows, use cls
        command = 'cls'
    os.system(command)

clearConsole()
Posted by: Guest on May-07-2021
0

clear screen python cmd

>>> import os
 >>> clear = lambda: os.system('cls')
 >>> clear()
Posted by: Guest on October-12-2021

Code answers related to "even if i use clear command in python screen it does not work"

Python Answers by Framework

Browse Popular Code Answers by Language