i have a list of list of strings as below
lst = [[\'a\',\'b\',\'c\'],[\'@\',\'$\',\'#\'],[\'1\',\'2\',\'3\']]
I want to concatenate each
Not as elegant as yatu's answer but if you're using pandas:
import pandas as pd pd.DataFrame(lst).sum(axis=0) # 0 a@1 # 1 b$2 # 2 c#3 # dtype: object
Pandas Series have a .tolist() method to get the expected output:
.tolist()
series = pd.DataFrame(lst).sum(axis=0) series.tolist() # ['a@1', 'b$2', 'c#3']