name='ABCDE'
length=len(name)
for i in range(0,length):
print(name[i],'\t',end='')
print(i, '\t', end='')
i+=1
print(i,'\t',end='')
print('hello')
Output:
A 0 1 hello
B 1 2 hello
C 2 3 hello
D 3 4 hello
E 4 5 hello
I am not able to understand the second line of output. In the second iteration the value of i should again be incremented in the for loop and the output should be:
C 2 3 hello
and so on in other iteration.