Well, this activity is difficult. I am stuck again and I can't seem to find anyone else who has this problem. D: Link: https://www.codecademy.com/courses/python-intermediate-en-rCQKw/2/3?curriculum_id=4f89dab3d788890003000096#
It gives me this error message: Oops, try again. Your code looks a bit off--it threw a "list index out of range" error. Check the Hint if you need help!
I expect it to return i as an interger.
def product(x): y = 0 z = x for i in x: if y < len(z): i = z[y] i *= z[y+1] y += 1 else: return i break
Note: I did z because i thought that if i did x x won't really be a variable, but just an argument and it would be [ , , ] so example: [1,2,3][y+1] won't work.
I might be wrong though.
Thanks in advance.