I have the following input:
[ ['A(x) | B(x)'],['Function(x,y) | K(x)'] ]
Each list within the list of list has a space before and after the character "|". How can I remove this to get the following result?
[ ['A(x)|B(x)'],['Function(x,y)|K(x)'] ]
I tried the following:
list=[]
k1=[]
for i in sentence:
k1="".join(i).replace(" ","")
list.append(k1)
result=[[i] for i in list]