Python entfernen Sie mehrere Zeichen aus String
import re
print(re.sub("e|l", "", "Hello people"))
"Ho pop"
Toothless
import re
print(re.sub("e|l", "", "Hello people"))
"Ho pop"
>>> import re
>>> name = "Barack (of Washington)"
>>> re.sub('[(){}<>\']', '', name)
>>> print(name)
Barack of Washington