title: Python best way to 'flip' a string of parentheses
body: <p>I want to write a program that "reflects" a string of parentheses across the y axis. So for example,  <code>((()(</code> would become <code>)()))</code>. I know that it can be done like this:</p>
  
  <pre><code>s = '((()('
  par = '(', ')'
  result = ''.join([par[1 - par.index(p)] for p in s[::-1]])
  </code></pre>
  
  <p>Is there a more concise / more pythonic way to do it? Thanks</p>