Return a list of lists of games for multiple days.

    If home and away are the same team, it will return all games for that team.

def games(years, months=None, days=None, home=None, away=None):
    """Return a list of lists of games for multiple days.

    If home and away are the same team, it will return all games for that team.
    """
    # put in data if months and days are not specified
    if months is None:
        months = list(range(1, 13))
    if days is 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