paren matching by nooodl

import os\x0d
s=[];o=''\x0d
for c in os.read(0,999):\x0d
 o+=c=='?'and s.pop()or c;i='([{'.find(c)\x0d
 if i+1:s+=[')]}'[i]]\x0d
print o

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return top