def games(years, months=None, days=None, home=None, away=None):
    # put in data if months and days are not specified
    if months == None:
        months = list(range(1,13))
    if days == None:
        days = list(range(1,32))
    results = []
    # check if lists, if not make lists
    # allows users to input either numbers or lists
    if not isinstance(years, list):
        years = [years]
    if not isinstance(months, list):
        months = [months]
    if not isinstance(days, list):
        days = [days]
    for i in years:
        for y in months:
            # get the days in a month
            daysinmonth = calendar.monthrange(i, y)[1]
            for x in days:
                if daysinmonth >= x:
                    # use the day function to get data for each day in range
                    game = day(i, y, x, home=home, away=away)
                    if game != []:
                        results.append(game)
    return results
Return a list of lists of games for multiple days.
dataset/ETHPy150Open zachpanz88/mlbgame/mlbgame/__init__.py/games