Following this thread about iterating through a sequence of operators, I want also to take care of unary operators in the same sequence. I used a lambda function to get rid of the second argument but are there special purpose tools/libraries for that in Python?
a, b = 5, 7
for op in [('+', operator.add), ('-', lambda x, y: operator.neg(x))]:
print("{} {} {} = {}".format(a, op[0], b, op[1](a, b)))