is it possible to assign a variable a maths operator.
this is what I've currently got, just a sample (typed it in now, so dont worry about simple errors)
if image == "lighten":
red_channel = red_channel + 50
else: // image is darken
red_channel = red_channel - 50
notice how i am repeating the exact same code, with a different operator. Is it possible to achieve something like this:
if (image == "lighten"):
operator = +
else:
operator = -
red_channel = red_channel operator 50