I have some arrays like this:
['دوره', 'ندارد', '\uf0d6', 'دارد']
I want to remove the specific Unicode characters like \uf0d6
from them. I have tried this:
for item in tagArray[0]:
if item.startswith('\u'):
tagArray[0] = tagArray[0].remove(item)
but when I run it, I receive this error:
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-1: truncated \uXXXX escape
How to fix this issue?
Edit: The Encode/Decode for ASCII Characters or the <128 methods don't work, since Persian characters aren't ASCII and it removes all of them.