I am asked to have a string loop and print in reverse. I can get it to do this but why praytell is the last letter starting it off...
data = "Why am I doing this is reverse order."
for index in range(len(data)):
print(index, data[-index])
0 W
1 .
2 r
3 e
4 d
5 r
6 o
7
...
Ah this is the closest I have come....not adding data[:-index], [-index:]...they are all wrong...
data = "Why am I doing this is reverse order."
for index in range(len(data)):
print(index, data[-index])
0 W
1 .
2 r
3 e
4 d
5 r
6 o
7
...