import time
for i in range(0,10,+1):
print(".", end="")
time.sleep(1)
Well here is the Program. I would like to know how I can start the. Ex. During this time of 1 second ... when I do not use the end it works but printing down.
import time
for i in range(0,10,+1):
print(".", end="")
time.sleep(1)
Well here is the Program. I would like to know how I can start the. Ex. During this time of 1 second ... when I do not use the end it works but printing down.
To continue printing on the same line as it happens,
in addition to changing the end-of-line character with the end
parameter, you must also pass the flush=True
parameter to synchronize the file without the end of line being present:
import time
for i in range(0,10,+1):
print(".", end="", flush=True)
time.sleep(1)