Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python strip multiple characters

>>> import re
>>> name = "Barack (of Washington)"
>>> re.sub('[(){}<>']', '', name)
>>> print(name)
Barack of Washington
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Python #strip #multiple #characters
ADD COMMENT
Topic
Name
7+6 =