the code stetim94 posted was just a hint, not the solution.
It's not done with simply changing the function-call and providing a list of integers instead of an integer.
but you are close to the solution.
lets take a look what you want to do:
- you create a local variable called result with value 1 -> correct,
- you want to iterate over all integers in the list and multiply each integer with the value stored in result -> correct
- you return the result -> correct
so whats wrong? its your conversion to string and back to integer. its not necessary, since you already have a list of integers.
you get the error-message, because you try to convert "[" back to an int, which is not possible
y=str(y) #if the argument was [1,2,3,4], then y now is "[1,2,3,4]", and the first element of your iteration is "["