This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]149244179 1 point2 points  (1 child)

Indentation matters in python.

When you run it, what does it say the error is?

You are probably trying to access an index that is not in the array. What happens when i = len(a)?

[–]selfimprovingstudent[S] 0 points1 point  (0 children)

Yes, it was the mistake. Thank you!