+ 2
How to clear the screen in python
3 odpowiedzi
+ 5
import subprocess, os
def cls(): _ = subprocess.call('clear' if os.name == 'posix' else 'cls')
+ 2
An interesting question with no easy answer it seems - see https://stackoverflow.com/q/1432480
print("\n" * 100) sort of works
Perhaps the real Pythonistas around here have some ideas...
+ 1
import os
os.system("cls")
or
os.system("clear")
depending on OS.
or print("\n" * 100)
those are a few possibilities