Найти - Пользователи
Полная версия: будильник
Начало » Python для новичков » будильник
1
yulyshka1999
помогите написать простой будильник ⏰
JOHN_16
как скажите, оч простой “будильник”
 >>> import time, datetime
>>> def wake_me(dt):
...     diff = (dt - datetime.datetime.now()).total_seconds()
...     time.sleep(diff)
...     print('Wake up boys and girls!')
... 
>>> wake_me(datetime.datetime(2018, 10, 3, 0, 51, 30))
Wake up boys and girls!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB