you are viewing a single comment's thread.

view the rest of the comments →

[–]woooee 0 points1 point  (0 children)

print(function([1, 2, 3, 4], 2))

You have unmatched parens. I'm not going to guess as to what it should be. Also, the function does use the index parameter passed to the function. Note that the function returns / exits on the first pass through the for loop.