Using strings in list functions


#1

Hello all,

Wondering what I am doing wrong? My code is written exactly as the first poster above, only I am receiving an error message saying join_strings returned 'x' instead of 'xyza'. Please help!

Thanks


Using strings in list functions...?
#2

Please correct your indentation of the line containing return.


#3

Thank you! This corrected it.


#4

it would be helpful if you wrote what you had to make it correct


#5

The indentation is incorrect. As written, he is returning after the loop finishes with the first element. What was intended was to return after the loop has completed iteration. By putting the return on the same indentation level as for, the correct value is returned.