I hope to remove \xao in the word of python list. Each word is a unicode type.
I have used replace method to get rid of \xa0, but it does not work.
list = [u'apple\xa0', u'banana']
list = [el.replace('\xa0',' ') for el in list]
print list
The expected res is:
list = [u'apple', u'banana']
The actual res is:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xa0 in position 0: ordinal not in range(128)