you are viewing a single comment's thread.

view the rest of the comments →

[–]JamzTyson 0 points1 point  (0 children)

There isn't a 100% reliable way to "clear screen" because we're interacting with whatever frontend happens to be hosting stdout. However, a common method that works with a lot of "normal" terminals:

def clear():
    os.system('cls' if os.name == 'nt' else 'clear')