for i in text2:
This will not give indices of the list, but the actual characters of the string as string. You may want to use enumerate
for i, char in enumerate(text2):
For example,
text2 = "Welcome"
for i in text2:
print i,
will print
W e l c o m e
but
text2 = "Welcome"
for i, char in enumerate(text2):
print i, char
will give
0 W
1 e
2 l
3 c
4 o
5 m
6 e