Do you wonder how to clear the screen in Python? This is something that I’ve been asked a lot of times, but its quite easy, I’d say.
You guys have probably tried the commands “cls” and “clear” already, but it didn’t work, did it? Not a problem. Here’s something which will work.
import os os.system('cls') # on windows
os.system('clear') # on linux
For OS X
os.system('clear') # on os x