str_to_replace = my_string[my_string.find('(') + 1:my_string.find(')')]
out = my_string.replace(str_to_replace, str_to_replace.replace(' ', ''))
How to remove specific characters in a string *within specific delimiters*, e.g. within parentheses