As the title says, I wanna create a real-time countdown timer in python
So far, I have tried this
import time
def countdown(t):
print('Countdown : {}s'.format(t))
time.sleep(t)
But this let the app sleep for the 't' seconds but the seconds in the line don't update themselves
countdown(10)
Desired Output :
Duration : 10s
After 1 second, it should be
Duration : 9s
Yeah, the problem is the previous line Duration : 10s
which I have to erase. Is there any way to do this?