How to clear the console in python interactive

def cls(): print("\033[H\033[J", end="")

And then --

cls()

Description, from stackoverflow answer --

Sources