Python 3.8: math.prod
Now that we have Python 3.8, we can use its math.prod:\n\ndef subtractProductAndSum(self, n):\n    digits = list(map(int, str(n)))\n    return math.prod(digits)
Now that we have Python 3.8, we can use its `math.prod`:\n```\ndef subtractProductAndSum(self, n):\n    digits = list(map(int, str(n)))\n    return math.prod(digits) - sum(digits)\n```
[]