Skip to content

Instantly share code, notes, and snippets.

@agiletalk
Created November 7, 2014 02:38
Show Gist options
  • Save agiletalk/17e92e1e6950e72e0a9f to your computer and use it in GitHub Desktop.
Save agiletalk/17e92e1e6950e72e0a9f to your computer and use it in GitHub Desktop.
__author__ = 'agiletalk'
from calendar import monthrange, SUNDAY
print(len([(year, month) for year in range(1901, 2001) for month in range(1, 13) if monthrange(year, month)[0] is SUNDAY]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment