python strip multiple characters

42

>>> import re
>>> name = "Barack (of Washington)"
>>> re.sub('[(){}<>\']', '', name)
>>> print(name)
Barack of Washington
import re
print(re.sub("e|l", "", "Hello people"))
"Ho pop"

Comments

Submit
0 Comments