python多行实时刷新输出 最后更新时间:2024年05月20日 可以使用reprint库下的output对象来实现多行实时刷新输出 ```python from reprint import output import time import random print "start the output" with output(initial_len=3, interval=0) as output_lines: while True: output_lines[0] = "First_line {}...".format(random.randint(1,10)) output_lines[1] = "Second_line {}...".format(random.randint(1,10)) output_lines[2] = "Third_line {}...".format(random.randint(1,10)) time.sleep(0.5) ```
Comments | NOTHING