I have three outputs and I want to replace it in every 3 seconds.
With this code it's printing only the c:
import sys
import time
a = 1
b = 5
c =10
while True:
sys.stdout.write("\r" + str(a))
sys.stdout.write("\r" + str(b))
sys.stdout.write("\r" + str(c))
time.sleep(3)
a += 1
b+=1
c+=1
sys.stdout.flush()
Does anybody have an alternative to print all of them in 3 lines?