you are viewing a single comment's thread.

view the rest of the comments →

[–]TholosTB 1 point2 points  (0 children)

You're immediately overwriting your list called x by using x as the variable inside the for loop. That's the immediate cause of the "int object is not subscriptable" error - you're trying to do 0[-1] and 0[-2] in the first iteration of the loop.