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 vnkvstnk
import datetime as dt
import calendar
def most_frequent_days(year):
dd = {x:0 for x in calendar.day_name}
target_day = dt.date(year, 1, 1)
while target_day.year == year:
dd[calendar.day_name[target_day.weekday()]] += 1
target_day += dt.timedelta(days=1)
return [x for x,y in dd.items() if y == max(dd.values())]
June 14, 2019