I am trying to use a list that has operations attached to them, but i can't get the numbers out of the list. Here is the list.
mylist=["+1", "-2", "*2"]
I was wondering if there was a way to put them together as a float, and then do the operation so it would do 1-2*2 and output the answer. Smaller the better. thanks :) the expected output is -2.
mylist=[+1, -2, *2]is illegal in Python.