Python Range Stack Overflow Apicoectomy