I have a question on this exercise:
I feel I'm very close. I looked at some other solutions and maybe those are better than mine but I want to see how I can fix my code to format correctly.
The text is "Python!" and I am getting the reverse of this to print out, but the problem is that it's printing one letter per line, instead of printing one letter after the other.
I could start completely over using someone else's solution (I looked at some solutions but they look completely different than mine). Is there a way to fix how I started writing this so it prints on one line without completely rewriting all the code?
Here is my code:
def reverse(text): length = len(text) for i in text: print text[length-1] length = length -1 text = "Python!" reverse(text)
This is the current output when I run my code: