✅ 🔥 Python3 || ⚡easy solution
\nclass Solution:\n    def subtractProductAndSum(self, n: int) -> int:\n        digits = [int(d) for d in str(n)]\n        product = 1\n        sum = 0\n       
```\nclass Solution:\n    def subtractProductAndSum(self, n: int) -> int:\n        digits = [int(d) for d in str(n)]\n        product = 1\n        sum = 0\n        for digit in digits:\n            product *= digit\n            sum += digit\n        return product - sum\n\n```
['Python3']