def flatten(l, ltypes=(list, tuple)):
    ltype = type(l)
    l = list(l)
    i = 0
    while i < len(l):
        while isinstance(l[i], ltypes):
            if not l[i]:
                l.pop(i)
                i -= 1
                break
            else:
                l[i:i + 1] = l[i]
        i += 1
    return ltype(l)
Writes 64-bit unsigned integer into the stream
dataset/ETHPy150Open CGATOxford/cgat/CGAT/IOTools.py/flatten--crossover with--dataset/ETHPy150Open denisenkom/pytds/pytds/tds.py/_TdsWriter.put_uint8