📜  从字符串python代码示例中删除所有括号

📅  最后修改于: 2022-03-11 14:45:30.777000             🧑  作者: Mango

代码示例3
>>> table = str.maketrans(dict.fromkeys("()"))
>>> string1 = '(this) (is) (a) (test)'
>>> string1.translate(table)
'this is a test'