escape sequence for clearing screen in python code example
Example 1: clear window python console
import os
clear = lambda: os.system('cls')
Example 2: clearing the terminal in python
import os
os.system("clear")
print("Hello!")
#Only Hello will be in the terminal