I am properly stuck on 13/15 - any hints regarding a working code would be much appreciated!

# 13/15: Any hints?

**mberegov**#2

```
def product(p):
q = 1
for i in range(len(p)):
q = q * p[i]
return q
print(product([4, 5, 5]))
```

```
def product("""list of numbers as in example"""):
"""counter""" = 1 #because multiplying by 0 is 0
for """each element in your list""" in """your list""":
# your counter should be multiplied by each element in your list \n and then return the result of this multiplying
```

Hope this helps.

**ajaxpro70050**#6

```
def product(numbers):
total = 1 # Total is 1 because anything times zero equals zero
total = int(total) # total has to be an integer
for x in numbers:
total *= x # Here, this means that it multiplies x by the total, and does so for each
return total
```

Yours works well. I took a different approach on the for loop and did this:

```
def product(list):
pro = 1
for number in list:
pro *= number
return pro
```

**ihypernova**#11

I found and learned what the "reduce" function does and came up with this:

```
def product(int_lst):
return reduce(lambda x,y: x * y, int_lst)
```

**velascor**#12

Here is my code, it's very simple to understand:

def product(lst):

result=1

for i in lst:

result *= i

return result