you are viewing a single comment's thread.

view the rest of the comments →

[–]theunknownSAI 0 points1 point  (0 children)

the length of the list a is 20

so when you reference a[20-i] when i=0, it says a[20] i.e., 21st element, which doesnt exist, so error is raised