def clear system clear code example
Example 1: python clear console
print('\033[H\033[J', end='')
Example 2: clear window python console
import os
clear = lambda: os.system('cls')
print('\033[H\033[J', end='')
import os
clear = lambda: os.system('cls')