import time date = time.strptime('2016 12 31', '%Y %m %d') print(time.strftime('posts/%Y/%m/%d/', date))
Standard input is empty
posts/2016/12/31/
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!