This is a sample of the array I am dealing with:
records = [[[[' 1'], [' 2'], [' 3'], [' 4']]], [[[' red'], [' blue'], [' black'], [' white']]]]
I want to end up with a structure like this one:
[[' 1',' 2',' 3',' 4'],[' red',' blue',' black',' white']]
I've tried the following:
levelOne = [recs for sublist in records for recs in sublist]
final = [recs for sublist in levelOne for recs in sublist]
And what I've got was:
[[' 1'], [' 2'], [' 3'], [' 4'], [' red'], [' blue'], [' black'], [' white']]