I have a list of Farsi characters (utf8) like this:
my_list = ['ﯾ', 'ﻲ', 'ﻴ'] And I would like to replace every occurrence of characters in this list in a text with another character like 'a'. Right now my code is like this:
text = text.replace('ﻴ', 'a') text = text.replace('ﻲ', 'a') text = text.replace('ﯾ', 'a') Is there any way to do this in one shot, for example using Regex and lists in Python 3?