How do you do os.system('clear') when you do from os import system?

I’m just curious to know how to do it is it the code under or am I just wrong

from os import system
system('clear')
1 Like

Yeah the code is correct, but just note that os.system is very slow. You should do something like:

from replit import clear

clear()

or

clear = lambda: print("\033c", end="", flush=True)

clear()
1 Like

good suggestions, but please stay away from Replit modules as they make your code work only on Replit.

1 Like

Not really, you can just use pip install replit.

But yeah I agree that you should stay away from Replit modules

1 Like