import datetime
start = datetime.time(23, 30)
end = datetime.time(1, 30)
now = datetime.datetime.now().time()
if start <= now <= end:
print("Work!")
import datetime
start = datetime.time(6, 30) # 6:30 утра
end = datetime.time(13, 30) # 13:30 дня
now = datetime.datetime.now().time()
if (start <= now <= end):
print("Work!")