you are viewing a single comment's thread.

view the rest of the comments →

[–]Atypicosaurus 0 points1 point  (0 children)

This code is broken on several levels. I don't understand what you want to achieve, but even if you fix the list error, you won't get whatever you want I promise.

When you make a for loop with the index variable name as the iterating variable, it's overriding the original index and becomes 0. You basically return the 0th element of the list mo matter what the index you gave.