So i have a code of a timer and When a person puts in the number i just want the timer to start and inputted number to not be visible.Code is something like
s=int(input("enter time in sec"))
countdown(s)
so the output is :
enter time in sec 5
0:4
0:3
0:2
0:1
0:0
time up
What i want is to first remove "enter time in sec 5" then when 0:4 prints i want to print 0:3 in its place not below it.
I tried Python deleting input line and copy pasted this on the code like so
s = int(input("enter time in sec "))
print ('\033[1A\033[K')
countdown(s)
and nothing seemed to happen, don't if im wrong in the implementation or it didn't work.
Edit:-
Tried both
os.system('cls')
and
print ('\033[1A\033[K')
neither seemed to work
my code,
def time_format(inp):
import os
m,s=divmod(inp,60)
#os.system('cls')
print ('\033[1A\033[K')
...code for printing time below...
Edit:- im on windows and am using Idle.
neither of the two work