clear python console in code code example Example: python clear console import sys, os os.system('cls')