whats wrong with my code?
def product(i):
    f = 0
    for e in i:
    return f


your code is creating a list with the elements in i witn an * in between them.

You are supposed to multiply all the elements.

for example


you should get

mult= 1*2*3*4*5*6

try making your code to multiply each element in the list


Hi, texcoder38436 explained why.
But here is the actual code if you are stuck:

def product(lista):
    total = 1
    for item in lista:
        total *= int(item)
    return total


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.