I'm executing code in python and want to update my status by rewriting the current line on the output. Example:
import time
print("1 a a a", end="\r")
time.sleep(1) #placeholder for doing stuff
print("2 a a a", end="\r")
time.sleep(1) #placeholder for doing stuff
print("3 a a a", end="\r")
time.sleep(1) #placeholder for doing stuff
print("BBBB")
print("c")
Now the output of this Code is
BBBBa a
c
How can I alter my code to have the following output?
BBBB
c
Thank you.