Is there a command to clear the screen in python?
Out of curiosity is there a command to clear the screen in python?
But first import os
Also what I like to do is put that in a function that I call clear():
def clear(): os.system(‘clear’)
So that it’s easier to call it
Specific to repl.it, use the package manager to install the
replit package and call
replit.clear() to clear the screen.
Mark as answer if this helps!
@Lord_Poseidon If I needed to clear the screen, I personaly wouldn't use
replit.clear(), because if you want to download the code and run it on off your browser, it wouldn't work and you would have to replace it with either
import os os.system('clear')
if you are on windows