So I am trying to use sys.stdout.write()
to rewrite the current line it is on and replace it with different text. But I want this to happen for multiple lines of output.
# I am looking at having 2 lines with changing values in them that will keep over writing themselves without moving any further down.
import sys
for i in range(10):
sys.stdout.write("\r" + "Hello" + str(i) + "\n + "Hello" + str(i) * 2)
sys.stdout.flush()
I tried this but every time it hits the \n it will indefinately increase the numbers of lines without clearing everything.