Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Unlucky Days by tokyoamado
from datetime import date
def checkio(year):
days = map(
date.fromordinal,
range(*[date(y, 1, 1).toordinal() for y in [year, year + 1]])
)
return len([d for d in days if d.day == 13 and d.weekday() == 4])
Jan. 12, 2018
Comments: