Could someone please help me understand why the following function does not print out the reverse of the string? What am I doing wrong?
def myReverse(data):
for index in range( len(data)-1, -1, -1 ):
return data[index]
print( data[index] )
myReverse('blahblah')