I have a keys
list including words. When I make this command:
for key in keys:
print(key)
I get normal output in terminal.
but when I print the entire list using print(keys)
, I get this output:
I have tried using key.replace("\u202c", '')
, key.replace("\\u202c", '')
, re.sub(u'\u202c', '', key)
but none solved the problem.
I also tried the solutions here, but none of them worked either:
Replacing a unicode character in a string in Python 3
Removing unicode \u2026 like characters in a string in python2.7
Python removing extra special unicode characters
How can I remove non-ASCII characters but leave periods and spaces using Python?
I scraped this from Google Trends using Beautiful Soup and retrieved text from get_text()
Also in the page source of Google Trends Page, the words are listed as follows:
When I pasted the text here directly from the page source, the text pasted without these unusual symbols.