Answers for "remove all parentheses from string python"

0

remove all parentheses from string python

>>> table = str.maketrans({"(":None, ")":None})
Posted by: Guest on February-20-2020
0

remove all parentheses from string python

>>> table = str.maketrans(dict.fromkeys("()"))
>>> string1 = '(this) (is) (a) (test)'
>>> string1.translate(table)
'this is a test'
Posted by: Guest on February-19-2020

Code answers related to "remove all parentheses from string python"

Python Answers by Framework

Browse Popular Code Answers by Language