import operator

def calc(lst):

    op = {
        '/': operator.truediv(lst[0], lst[2]),
        '+': operator.add(lst[0], lst[2]),
    }

    return op[lst[1]]


print(calc([1, '/' , 2]))
print(calc([1, '+' , 2]))
