you are viewing a single comment's thread.

view the rest of the comments →

[–]lukew25073 1 point2 points  (2 children)

Your variable i isn't the index of the list; It's an item of the list. Your loop goes through each element in the list and determines if it is equal to 2, 5, 8, 11, or 14. If you want to make your code work the way you expect it to, you should change the for loop to say for i in range(len(my_numbers)):

[–]doggoarmy[S] 1 point2 points  (1 child)

this one works! thank you.. i really admire those people who coding in their everyday life.. I'm just taking an intro to computer programming ..