`
n = [2, 4, 6, 8]
res = 1
for x in n[1:3]:
res *= x
print(res)
`
I don't understand how this code works or what it does. I believed that it should multiply x (which is chosen randomly from 4, 6, or 8) by res, but it doesn't do that.
I thought that the n[1:3] meant numbers 1 and 3 (4 and 8 in the data set respectively) but that multiplies to 32. I don't know what the x is now. Can anyone explain how it works?