language: Python 3 (python-3.2.3)
date: 755 days 2 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
import re
 
s = input()
 
p = re.compile("\([^()]*\)")
 
count = 1;
while count != 0:
    s, count = p.subn("", s)
print(s)