Using cls() function in Python shell

  1. Create a file named tools.py
  2. now wrtie the below code and save it in lib directory under *\Python\Python38-32\Lib
import os

def cls():
 os.system('cls')

3. Now start python in command shell and import the file by the following code.

>>  from tools import cls
>> cls() # use the command for clear the screen!
Customizable Disclaimer Section: Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.

Leave a Reply

Your email address will not be published. Required fields are marked *