def month_weekdays(year_int, month_int):
 cal = calendar.Calendar()
 return [d for d in cal.itermonthdates(year_int, month_int) if ((d.weekday() < 5) and (d.year == year_int))]

def month_weekdays ( year_int , month_int ) : cal = calendar . Calendar ( ) return [ d for d in cal . itermonthdates ( year_int , month_int ) if ( ( d . weekday ( ) < 5 ) and ( d . year == year_int ) ) ]
produces a list of datetime .