I have generated the results into the list like this
In[11]: a
Out[11]: [[[1, 3, 2, 4], [1, 3, 2, 6]],
[[2, 4], [2, 6]],
[[3, 2, 4], [3, 2, 6]],
[[4]],
[[5, 4]],
[[6]]]
but I would like to remove the square brackets that are leftover resulting as this
[[1, 3, 2, 4], [1, 3, 2, 6],[2, 4], [2, 6],[3, 2, 4], [3, 2, 6],[4],[5, 4],[6]]
I have tried sum(a,[]) to reduce 1 dimension but the result is shown as follows
[1, 3, 2, 4, 1, 3, 2, 6, 2, 4, 2, 6, 3, 2, 4, 3, 2, 6, 4, 5, 4, 6]
and tried np.squeeze(a) but the result is shown as follows
array([list([1, 3, 2, 4]), list([1, 3, 2, 6]), list([2, 4]), list([2, 6]),
list([3, 2, 4]), list([3, 2, 6]), list([4]), list([5, 4]),
list([6])], dtype=object)
any suggestions for aggregating this kind of list?
thank you in advance
sum(a,[])worked on my machine. check.