Turn a list of lists into a list.
198059
def flatten(self, l):
        """"""
        if l == []:
            return l
        if isinstance(l[0], list):
            return self.flatten(l[0]) + self.flatten(l[1:])
        return l[:1] + self.flatten(l[1:])
205929
def dedup_list(l):
    """"""
    dedup = set()
    return [ x for x in l if not (x in dedup or dedup.add(x))]
243970
def flatten(nested_list):
    ''''''
    return_list = []
    for i in nested_list:
        if isinstance(i,list):
            return_list += flatten(i)
        else:
            return_list.append(i)
    return return_list
108061
def _crop_list_to_size(l, size):
    """"""
    for x in range(size - len(l)):
        l.append(False)
    for x in range(len(l) - size):
        l.pop()
    return l
866910
def process_lists(self):
        """"""
        for l1_idx, obj1 in enumerate(self.l1):
            for l2_idx, obj2 in enumerate(self.l2):
                if self.equal(obj1, obj2):
                    self.matches.add((l1_idx, l2_idx))
1320335
def __construct_list(self, list_value):
        
        array = []
        for value in list_value:
            array.append(self.__iterate_value(value))
        return array
494050
def join_cols(cols):
    """"""
    return ", ".join([i for i in cols]) if isinstance(cols, (list, tuple, set)) else cols
1112883
def chunks(some_list: List, n: int) -> Iterable[List]:
    """"""
    for i in range(0, len(some_list), n):
        yield some_list[i:i + n]
23055
private static <E> List<E> toList(Iterable<E> iterable)
	{
		List<E> list = new ArrayList<>();
		iterable.forEach(list::add);
		return list;
	}
899358
def _flatten(l):
    
    res = []
    for sublist in l:
        if isinstance(sublist, whaaaaat.Separator):
            res.append(sublist)
        else:
            for item in sublist:
                res.append(item)
    return res
991787
def trunc_list(s: List) -> List:
    """"""
    if len(s) > max_list_size:
        i = max_list_size // 2
        j = i - 1
        s = s[:i] + [ELLIPSIS] + s[-j:]
    return s
652561
def merge_lists(l, base):
    
    
    for i in base:
        if i not in l:
            l.append(i)
182338
def _chunk_list(l, n):
    """"""
    for i in range(0, len(l), n):
        yield l[i:i + n]
1254392
def concat_list(listA, listB, delim=' '):
    

    # Lists must be of equal length.
    if len(listA) != len(listB):
        raise IndexError('Input lists are not parallel.')

    # Concatenate lists.
    listC = []
    for i in xrange(len(listA)):
        app = listA[i] + delim + listB[i]
        listC.append(app)

    return listC
261127
def to_list(self):
        """"""
        output = []
        for i in range(1, len(self.elements), 2):
            output.append(self.elements[i])
        return output
1150459
def _to_tuple(self, _list):
        
        result = list()
        for l in _list:
            if isinstance(l, list):
                result.append(tuple(self._to_tuple(l)))
            else:
                result.append(l)
        return tuple(result)
490934
def split_list(alist, wanted_parts=1):
    
    length = len(alist)
    return [
        alist[i * length // wanted_parts:(i + 1) * length // wanted_parts]
        for i in range(wanted_parts)
    ]