In the first case, what is integer? Is it a number or a list, or some other object?
for num in integer:
The above line suggests it is an iterable, which would not be an integer unless we made it into a list of numbers, first.
Now that line totally throws one off since num is a value in the list, not an index.
l *= num
Let's think of what we are passing in as arguments, and what to expect as return values.
arguments => list of numbers
return => product of the list
The parameter describes the expected arguments. In this case we are expecting numbers, so that's a good name to use. At this point, a list, tuple, or even a set would be doable, and they don't have to have this name. Better, actually if they don't. Keep this one local and unused elsewhere owing that it is a data structure, not a value.
l is the least favorable letter to use as a variable name, just so you know. Even variable names that start with l can be tricky, as we witnessed in another topic a few days ago. It is so very often mistaken for a 1 (one) that one favors to avoid its use as much as possible.
If anything use a letter that jumps out.
p = 1
The first question, 'what is p?' should pop up for a reader. Scanning the code one would see,
p *= num
and the question would be answered. p is the product of the numbers so far multiplied in the list.