How to convert a 2 element(with x elements) array into a 2*x elelment array?
Using the below example => How do I convertbbb
in to bbb2
>>> bbb
[[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]]
>>> bbb2
[[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]]
>>> len(bbb)
2
>>> len(bbb2)
4
I am thinking of a for loop and looping through until I get what I want but is there a better way?
possibly related:
How do I concatenate two lists in Python?
How to make a flat list out of list of lists