Python string -- swap positions in and out of parentheses
<p>I have the following string:</p>

<pre><code>"Person One (Something inside here) Second Thing (another thing) OK (something else)"
</code></pre>

<p>I need to get the following:</p>

<pre><code>"Something inside here (Person One) another thing (Second Thing) something else (OK)"
</code></pre>

<p>Currently I am doing it like:</p>

<pre><code>inside_parens = []
for item in str.split("("):
    if not ")" in item:
        inside_parens.append(item)
    else:
        inside_parens.append(item.split("(")[0])
...
</code></pre>

<p>What would be a better approach?</p>
