Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import datetime
- periods = [0, 178, 356, 534]
- today = datetime.datetime.today()
- dates = []
- for n in periods:
- dates.append( (today - datetime.timedelta(days=n)).strftime("%Y%m%d %H:%M:%S %Z") )
- print(dates)
- # and now use loops with `dates`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement