I want to delete all the characters "\ L" that I find when reading a file. I tried to use this function when I read the line:
def cleanString(self, s): if isinstance(s, str): s = unicode(s,"iso-8859-1","replace") s=unicodedata.normalize('NFD', s) return s.encode('ascii', 'ignore')
But he does not delete this symbol. Does anyone know how to do this?
I tried using the replace function, but this is not better:
s = line.replace("\^L","")
Thank you for your responses.
python unicode
Kvasir
source share