1 year ago

#256756

test-img

Aspen Grey

How to "Carriage return" with two or more lines simultaneously?

print("Z1: ",zeta_1_time," Z2: ",zeta_2_time," Z3",zeta_3_time,end="\r")
print()
print("GAMMA: ",gamma_time, end="\r")

As you can see from code above, I am having trouble getting carriage \r to function properly. I need both the ZETA times and the GAMMA times to be "updating" on their own line, within the same while loop. However, this is the output I am getting in return.

OUTPUT:

Z1:  9  Z2:  6  Z3:  3
Z1:  0  Z2:  0  Z3:  0
GAMMA:  0

The longer the while loop, the more lines ZETA creates. Any suggestions?

The output should stay looking like this:

Z1:  9  Z2:  6  Z3:  3
GAMMA:  0

python

printing

line

carriage-return

0 Answers

Your Answer

Accepted video resources