7. reverse understanding


I'm having a very hard time understanding even where to start on this. I don't understand the fundamental problem where you need to separate the letters and then flip them in order for python to print the reverse order of the letters in the word.

If anyone can help me with this, it would be greatly appreciated! :slightly_smiling:


You are probably overthinking this. For loops in python can select each letter within a string, and you can do whatever you'd like with that letter. Think about creating a function that is passed a string and will return a new string, but the new string needs to have each letter appended in a way so that each character is before the rest of the string. Think about if you wanted to copy the original text in the same order to a new string, you'd have something like this:

newText = ""
for char in text:
    newText = newText + char

How can you change the way the char is appended to newText so that it will be before the rest of the other letters (the last line is the only thing that needs to be changed)?