Created
May 9, 2016 19:51
-
-
Save jpr71/5649b63486a346b570b87d830054d7bf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
current_time = datetime.datetime.now() | |
def nine_to_five_weekday(time): | |
if time.weekday() in range(0,5) and time.hour in range(9,17): | |
return 20 | |
else: | |
return 80 | |
print nine_to_five_weekday(current_time) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment