Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python clear console

from os import system
from sys import platform

clear_screen = lambda: system("cls" if platform == "win32" else "clear")
clear_screen() # will clear the console

# Cross-platform using appropriate commands for Windows and non-Windows
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #clear #console
ADD COMMENT
Topic
Name
7+1 =