I have a zipped object like this:
z = zip(a, b)
lst = list(z)
print(lst)
Output:
[(0, array([[72, 65],
[70, 71]], dtype=uint8)),
(1, array([[ 71, 99],
[190, 163]], dtype=uint8)),
(2, array([[52, 59],
[69, 72]], dtype=uint8)), etc...
I would like to flatten this list to the following:
[0, 72, 65, 70, 71, 1, 71, 99, 190, 163, 2, 52, 59 etc..]
I've tried doing this with
y = sum(w, ())
# or
y = list(itertools.chain(*lst))
But the arrays are still there when I print.
What am I doing wrong?