I have this code:
print("Please wait, your question is loading...")
sleep(4)
I want to add another print()
with text, which will replace the print()
above after sleep(4)
.
How to do that? I am using the latest version Python 3.9.0
I have this code:
print("Please wait, your question is loading...")
sleep(4)
I want to add another print()
with text, which will replace the print()
above after sleep(4)
.
How to do that? I am using the latest version Python 3.9.0
Once you print something, then to erase it, you have not other alternative else than clear the screen. In Windows use:
import os
os.system('cls')
And in linux call clear
command. And then print other things.
well you could do something like this:
from os import system
from time import sleep
print("whatever you want")
sleep(2)
system("cls") # if you are on linux then replace cls with clear
print("whatever you want")
system.clear allows you to clear everything on the console.