def flatten(aList):
    """
    aList: a list
    Returns a copy of aList, which is a flattened version of aList
    """
    return ([aList] if not (type(aList) == list)
            else aList if len(aList) == 0
    else flatten(aList[0]) + flatten(aList[1:]))