Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for The Most Frequent Weekdays by MBM_1607
from datetime import date
WEEKDAYS = {1: "Monday", 2: "Tuesday", 3: "Wednesday",
4: "Thursday", 5: "Friday", 6: "Saturday", 7: "Sunday"}
def most_frequent_days(year):
days = {date(year, 1, 1), date(year, 12, 31)}
return [WEEKDAYS[x] for x in sorted({i.isocalendar()[2] for i in days})]
Aug. 12, 2018