Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Weekend Counter by tokiojapan55
from datetime import date
from datetime import timedelta
def checkio(from_date, to_date):
return len([d for d in [from_date + timedelta(i) for i in range((to_date - from_date).days + 1)] if d.weekday() in [5,6]])
April 20, 2020
Comments: