Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

clear console in python

As you mentioned, you can do a system call:

For Windows
>>> import os
>>> clear = lambda: os.system('cls')
>>> clear()

For Linux the lambda becomes
>>> clear = lambda: os.system('clear')
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #clear #console #python
ADD COMMENT
Topic
Name
8+8 =