H! I’ve seen a right code for the problem on GitHub.
def product(x): n=1 for i in x: n*=i return n
As I understand this: i have a list, then I take every value from the list and multiply them by n which in this case is equal to 1. Then I return n.
So if the list is for example: [1,5,7] I will return 1,5,7 which doesn’t make much sense…
What’s the idea of the code?