There seems to be a problem with my conditional. It returns 500 instead of 100.
Strangely, when for each num in numList I print numList.index(num) I'm getting: 0, 1, 1, instead of 0, 1, 2. This might have something to do with why the conditional is failing.
I'm also not sure if "break" is the correct syntax? I've also tried using while, but get stuck in an endless loop.
Any help would be appreciated! Thanks
numList2 = [4, 5, 5] def product(numList): total = numList index = 0 for num in numList: if numList.index(num) != ((len(numList))-1): total = total * numList[index + 1] else: break print(total) product(numList2)