Awesome Timer Python with Input Date Time

Published: 05 August 2022
on channel: Python 5
1,773
75

#shorts #python #programming #coding

import datetime, time
t = input("Enter a time (yyyy-mm-dd H:M:S): ")
t = datetime.datetime.strptime(t, '%Y-%m-%d %H:%M:%S')
while True:
print("Remain time:", (t-datetime.datetime.now()).seconds, "seconds", end="\r")
time.sleep(1)
if ((t-datetime.datetime.now()).seconds=0):
print("Stopped at", t)
break


Watch video Awesome Timer Python with Input Date Time online without registration, duration hours minute second in high quality. This video was added by user Python 5 05 August 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,773 once and liked it 75 people.