Difference of Product and Sum of Digits : <p>The task is to find the difference in the products of the digits and sum of digits. For example, an input of <code>4 5 6</code> would give <code>105</code>. The issue I'm having is dealing with previous iterations. I know it has something to do with the indexes of the list but I'm having difficulty figuring it out. Here's my code:</p>

<pre><code># find the difference between the product of all digits and sum of all digits
nums = input()
nums = list(nums.split())

def findProduct():
    for i in range(len(nums)):
        int(nums[i]) *= int(nums[i+1])


findProduct()
</code></pre>
