See the last two lines I commented ? Lines 39 and 40 in the paste. i grows too big, causing the IndexError.
See the last two lines I commented ? Lines 39 and 40 in the paste. i grows too big, causing the IndexError.