I have scraped a webpage using beautiful soup.
I'm trying to get rid of a '\n
' character which isnt eliminated despite whatever I try.
My effort so far:
wr=str(loc[i-1]).strip()
wr=wr.replace(r"\[|'u|\\n","")
print(wr)
Output:
[u'\nWong; Voon Hon (Singapore, SG
Kandasamy; Ravi (Singapore, SG
Narasimalu; Srikanth (Singapore, SG
Larsen; Gerner (Hinnerup, DK
Abeyasekera; Tusitha (Aarhus N, DK
How do I eliminate the [u'\n? What am I doing wrong?
The full code is here.