Yeah others have pointer out the error, but I want to really recommend using VSCode with the Python extension and static types. It will make finding these errors super easy because it adds a red underline exactly where the problem is.
Static types means:
def splitter(expression: str) -> tuple[str, str, str]:
...
def calculate(x: str, y: str, z: str) -> str: