Python | Easy Solution✅
\ndef subtractProductAndSum(self, n: int) -> int:\n        prod = 1        # n =234\n        sums = 0\n        while n != 0:       #           1st loop     2nd 
```\ndef subtractProductAndSum(self, n: int) -> int:\n        prod = 1        # n =234\n        sums = 0\n        while n != 0:       #           1st loop     2nd loop    3rd loop \n            last = n % 10   # last =    4            3           2\n            prod *= last    # prod =    1*4 = 4      4*3 = 12    12*2 = 24\n            sums += last    # sums =    0+4 = 4      4+3 = 7     7+2 = 9\n            n =n//10        # n    =    23           2           0\n        return prod - sums  # 24 - 9 = 15\n```
['Python', 'Python3']