title: python regular expression re.sub error
body: <p>I have a .csv files that might have brackets mixed in:</p>
  
  <pre><code>line = "fdf,dfdf,(1,2,3,4,5),(ss,dd),"
  </code></pre>
  
  <p>Now I want to replace all the () with "", so that it looks like this:</p>
  
  <pre><code>line = 'fdf,dfdf,"1,2,3,4,5","ss,dd",'
  </code></pre>
  
  <p>My code is:</p>
  
  <pre><code>line=re.sub(',(', ',"', line)
  line=re.sub('),', '",', line)
  </code></pre>
  
  <p>However I got this error: </p>
  
  <pre><code> ...
   File "/usr/local/Python-2.7/lib/python2.7/re.py", line 151, in sub
      return _compile(pattern, flags).sub(repl, string, count)
    File "/usr/local/Python-2.7/lib/python2.7/re.py", line 242, in _compile
      raise error, v # invalid expression
  sre_constants.error: unbalanced parenthesis
  </code></pre>
  
  <p>What is wrong here?!!</p>