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