Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Print on the same position
#2
What version of windows are you using? Are you running it from the console, or an ide?

I'm on Windows 10, with python 3.7.0, and your code works as expected:
>>> import time
>>> for n in range(5):
...   print(f"time is {n}", end="\r")
...   time.sleep(0.1)
... else:
...   print()
...
time is 4
>>>
Reply


Messages In This Thread
Print on the same position - by Marv - Dec-03-2018, 06:35 PM
RE: Print on the same position - by nilamo - Dec-03-2018, 06:42 PM
RE: Print on the same position - by Marv - Dec-03-2018, 06:58 PM
RE: Print on the same position - by nilamo - Dec-03-2018, 07:12 PM
RE: Print on the same position - by Marv - Dec-03-2018, 09:03 PM
RE: Print on the same position - by nilamo - Dec-03-2018, 09:40 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020