import datetime, calendar year = 2019 month = 1 num_days = calendar.monthrange(year, month)[1] for i in range(1,num_days+1): print(str(month) + "/" + str(i) + "/" + str(year) + ": ")
Acceptance criteria failure! My numbers are first to last, I want last to first. So the range gets modified.
import datetime, calendar year = 2019 month = 2 num_days = calendar.monthrange(year, month)[1] for i in range(num_days, 0, -1): print(str(month) + "/" + str(i) + "/" + str(year) + ": ")
No comments:
Post a Comment