After a bit further analysis on my requirement.I gained some more clarity..Sorry for presenting an unclear question.
I want to know how can we parse a string with braces of the form((Question)(Left_Node)(right_node)). The question for example wil be of the form if segment size < 1.5,then choose left node,else right.The question can be a dictionary with a key and a value.Left and right node represent a complete left or right half tree.Need to recursively parse the tree till the leaf node is reached.In this manner need to build an decision binary. I am working on speech synthesis,and am new to this python programming,so looking for help in coding,please suggest methods for implementing this kind??
Please answer...
thanks in advance..