I am trying to get the result of two lists depending on the operator in another separate column in Python.
Here is my code
up = ["123", "1", "7685", "9987"]
down = ["45", "46", "435", "2"]
op = ["+", "-", "+", "*"]
for u, d, o in zip(up, down, op):
#print(u, o, d)
#print(int(u) + int(d))
print(int(u), o , int(d))
I can print out but what I want is to get the results. This is the output I am looking for.
168 -45 8120 19,974