

61·
6 hours agoFunctions in Python can only return a single value. While you are allowed to comma-separate additional values, as you have done, they are combined into a single tuple object that wraps the intended values.
As such, your splitter function is returning a single tuple containing three strings. Your calculate function is expecting three individual arguments (I’m guessing that the error trace mentions this).
To get around this, you can use the splat/asterisk operator to “unpack” the items from the tuple:
a, b, c = splitter(expression)
# or, inline
calculate(*splitter(expression))
Edit: removed bad asterisk
Gahh, serves me right for blindly writing code on my phone!