Answer the question
In order to leave comments, you need to log in
[[+content_image]]
How to get multiple days of the months of the current year?
I would like it in this form: [[1, 2, 3, 4, ... , 31][1, 2, 3, 4, ... , 28]...]
Are there ready-made functions for such generation or how receive and arrange so days and months?
Answer the question
In order to leave comments, you need to log in
import calendar
year = 2015
print [
list(range(1, calendar.monthrange(year, month)[1] + 1))
for month in range(1, 13)
]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question