i have a print function that prints a line every second, and it updates every time. for the most part ...end="\r"
does the job but for some reason it doesnt really delete the previous line, it just overlaps it, meaning that the end of the previous line will sometimes just permanently be sticking out, making it unreadable and jarring to look at.
my function looks like this:
import time
def example():
#some code setting up stuff
while True:
print("some calculation i'm too lazy to actually reproduce", end="\r")
time.sleep(1)
i have been looking all over and i have so far been unable to find the solution or even people having the same question as mine, and im tired of seeing lines get printed with four s'es after it.
edit: in my actual code there is an actual calculation being done in the print statement with changing variables, this example is just an abridged version of my code.
couldnt i use flush=True
for this or does that also turn out to do something completely different?