How can I turn this string:
a = "1 + 2 + 3"
into an operation which will output 6? Is there any code made for this?
6
You can use eval:
eval
>>> a = "1 + 2 + 3" >>> eval(a) 6