I have a string with mathematical operations, how do I evaluate the string within [] to generate the output shown below?
mystring = "[2*3-1] plus [4+2] is equal to [5+6]."
re.findall(r"\[(.*?)\]",mystring) # to find 2*3-1, 4+2, 5+6
Output: "5 plus 6 is equal to 11." # expected output.