clear python in cmd code example Example: clear window python console import os clear = lambda: os.system('cls')