>>> table = str.maketrans(dict.fromkeys("()")) >>> string1 = '(this) (is) (a) (test)' >>> string1.translate(table) 'this is a test'