Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- """
- @_Author: MadMerlyn
- Odd Example Program
- """
- from datetime import datetime
- import time
- #generate a list of odd numbers from 1 to 59
- odds = list(range(1,60,2))
- #loop once per minute 5 times
- for i in range(5):
- right_this_minute = datetime.today().minute
- if right_this_minute in odds:
- print("This minute seems a little odd")
- else:
- print("Not an odd minute.")
- time.sleep(60)
Advertisement
Add Comment
Please, Sign In to add comment