def diffWaysToCompute(self, input: str) -> List[int]:
    if input.isdigit():
        return [int(input)]
    res = []
    for (index, value) in enumerate(input):
        if (value in ['+', '-', '*']):
            left = self.diffWaysToCompute(input[:index])
            right = self.diffWaysToCompute(input[(index + 1):])
            for l in left:
                for r in right:
                    if (value == '+'):
                        res.append((l + r))
                    elif (value == '-'):
                        res.append((l - r))
                    elif (value == '*'):
                        res.append((l * r))
    return res
def diffWaysToCompute(self, input: str) -> List[int]:
    if input.isdigit():
        return [int(input)]
    res = []
    for (index, value) in enumerate(input):
        if (value in ['+', '-', '*']):
            left = self.diffWaysToCompute(input[:index])
            right = self.diffWaysToCompute(input[(index + 1):])
            for l in left:
                for r in right:
                    if (value == '+'):
                        res.append((l + r))
                    elif (value == '-'):
                        res.append((l - r))
                    elif (value == '*'):
                        res.append((l * r))
    return res