def split(some_list,
          parts):
    """Split a list into a number of smaller lists of approximately
    equal length
    """

    avg = len(some_list) / float(parts)
    out = []
    last = 0.0

    while last < len(some_list):
        out.append(some_list[int(last):int(last + avg)])
        last += avg

    return out