[ad_1]
You are passing prefix_exp_str[1:] to both the recursive calls. Instead, the second recursive call needs to receive whatever is left of the input string after the first recursive call is finished.
[ad_2]
solved Creating an expression tree for prefix expression