I have a badly structured data and I need to clean it up, suppose I have the following list:
l={{"a","b","c"},{"e"," f","g"},{" a"," b"}}
As you can see they are string, yet some are having an extra Space, instead of being "a" for example it is " a" I was wondering how one deletes those extra spaces to achieve the right format of data. I have tried StringTrim[]
but it seems it does not work on a list?
Map[StringTrim, l, {-1}]
$\endgroup$StringTrim/@l
?? $\endgroup$