K
K
KitCat122021-09-24 12:22:01
Python
KitCat12, 2021-09-24 12:22:01

How to change multiline output dynamically?

For example, there is such a line, divided by 2 through \n
my_string = f"Ответов: {i}\nОшибок: {i}"

Tried to change from

sys.stdout.write(output)        
sys.stdout.flush()

but it only changes the second line (inserting new 2's instead), leaving the first line unchanged.
614da16bbe001325152087.png
How can I do that? Preferably without third-party libraries.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question