Reverse - legal solution?


My question is whether following is a legal solution, since the task includes not to use reversed or [::-1] for the solution.

def reverse(text):
    for n in text:
    return ''.join(b) 

I am guessing I ended up writing the underlying function of the “reversed” function :smiley:


you use the .reverse() method, i would consider it cheating. But then, you are here to learn, so its your choice.

the best scenario would be to write your own alrogithm to reverse a given string


Yes I thought so. I will attempt a “legal” solution as well


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.