how to clear screen
Does anyone know how to clear the screen during the code?
a clear command would be very useful to my program and I don't know one.
PythonKiddie
What about in Python
theangryepicbanana
What language are you using?
jmbeaner
@theangryepicbanana I am using python... I should have specified that. My bad
theangryepicbanana
@jmbeaner try print("\x1b[2J\x1b[H", end="")
hey!
because you are using python, it is pretty easy to do this
at the top of your file
to clear the screen, call the
clear
functionif you want to see this in action, i forked a repl (credit to @jamiebally) here
hope i could help :P
@eankeen do you know how to do this in c++? :)
@etian i dont believe the usual way peopls use to clear the screen in c++ work in repl (i havent actually tried it myself, this is what i heard). this is why you have to import the
replit
module in python - i dont think there is a similar thing for c++ :P@eankeen In python you can also import system and do system("cls") and it should clear the console
@etian "clear" works now
@eankeen alright thanks anyway