I've a data like this,
data = [array(['a', 'b', 'c']),
array([['d', 'e', 'f'], ['g', 'h', 'i']]),
array([['j', 'k', 'l'], ['m', 'n', 'o'], ['p', 'q', 'r']])]
I want to join values in inner list sequentially. This is the desired output that I need.
[['a', 'b', 'c'], ['d g', 'e h', 'f i'], ['j m p', 'k n q', 'l o r']]
I tried using using multiple loops and join but it's not giving me required output.
for i in data:
for j in i:
print(" ".join(j))
I'm not really sure on how to achieve this? Need an efficient and faster approach because my original data is really large.