Splitting an expression
<p>I have to split a string into a list of substrings according to the criteria that all the parenthesis strings should be split .</p>

<p>Lets say I have <code>(9+2-(3*(4+2)))</code> then I should get <code>(4+2)</code>, <code>(3*6)</code> and <code>(9+2-18)</code>.</p>

<p>The basic objective is that I learn which of the inner parenthesis is going to be executed first and then execute it.</p>

<p>Please help....</p>

<hr>

<p>It would be helpful if you could suggest a method using re module. Just so this is for everyone it is not homework and I understand Polish notation. What I am looking for is using the power of Python and re module to use it in less lines of code.</p>

<p>Thanks a lot....</p>
