I was reading this article to understand how can I reverse string in python.
Now while implementing I am getting stuck -
I couldn't use ".join(reversed(string)) or string[::-1] methods.
Here is what my code looks like:
def reverse(text): while len(text) > 0: print text[(len(text)) - 1], del(text[(len(text)) - 1]I am getting invalid syntax on del(text[(len(text)) - 1]
Is there any suggestion?
Thank you for your help!