index=0
while True:
stri=input("enter the strings : ")
if stri=="Exit" or stri=="exit":
break
for indexes in stri:
letter=stri[index]
print(index, letter)
index=index+1
После отображения значения индекса первой введенной строки отображается ошибка
enter the strings : abcdfg
0 a
1 b
2 c
3 d
4 f
5 g
enter the strings : qwerty
Traceback (most recent call last):
File "len.py", line 10, in <module>
letter=stri[index]
IndexError: string index out of range
это ошибка, которую я получаю