<s>[INST] import time
from datetime import datetime

def countdown(t):
    while t:
        mins, secs = divmod(t, 60)
        timer = '{:02d}:{:02d}'.format(mins, secs)
        print(timer, end="\r")
        time.sleep(1)
        t -= 1
    print('Timer has finished')

# input time in seconds
t = input("Enter the time in seconds: ") 

# function call
countdown(int(t))

countdown(5) # add this to the end, in case no input is given, timer will still run for 5 seconds by default.
When I run this script, it still doesn't wait for the input and just jumps straight to the 5-second timer.  
How can I achieve this without re-arranging the code and without adding extra variables?[/INST]