My task is to define a function weekdays(weekday) that returns a list of weekdays, starting with the given weekday. It should work like this:
weekdays(weekday)
You don't need to hardcode array of weekdays. It's already available in calendar module.
import calendar as cal def weekdays(weekday): start = [d for d in cal.day_name].index(weekday) return [cal.day_name[(i+start) % 7] for i in range(7)]