Ask your own question, for FREE!
Computer Science 15 Online
OpenStudy (anonymous):

Python Why does following code give me an error for string index out of range? text = ("aaaaassss") if text.isalpha() == True: i = 0 counter = 0 for i in (0,len(text)): if text[i] == text[i+1] and i+1 <= len(text): counter = counter + 1 print (counter) print("klk")

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!