Say I had a list number_list = [3,4,9]
And I wanted to operate on the numbers in the list based on a list such as operators = ['+', '-']
This program would take these lists and operate on the numbers using the list. Using the example lists, the following would be equated:
3 + 4 - 9
And the function would return the result of this equation.
Whilst I know the order for plus and minus operations does not matter, I plan on using this with multiplication and division as well, where order does matter.
Thank you to anyone who can provide some insight as to how I would do this.