Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python clear console

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()
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #python #clear #console
ADD COMMENT
Topic
Name
9+3 =