I have a string in which the elements are seperated by a pipe operator. l="EMEA | US| APAC| France & étranger| abroad ". I split the list with the '|' and the result is now in a list.
The elements have unwanted space before and some have them after. I want to modify the list such that the elements don't have unwanted space.
bow= "EMEA | US| APAC| France & étranger| abroad "
attr_len = len(attr.split(' '))
bow = bow.split('|')
for i in bow:
i.strip()
The output still shows the list having strings with unwanted space.