import re statement = "(2*(3+1))*2"print re.match(r"\(.+\)", statement)
Standard input is empty
<_sre.SRE_Match object at 0xb758bcd0>
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!