Reverse cheat


#1

def reverse(text):
cheat = list(text)
return "".join(cheat[::len(text) - len(text) -1] )

I found a way to cheat the rules! """You may not use reversed or [::-1] to help you with this."""


#2

i think there are easier solutions to come up with then your "cheat", don't you think?


#3

there's many pythonic ways to do it , but this is really the same as [::-1]


#4

Hi @pyplayer12737,

Considering that the aim of the exercise is for you to learn something, and considering that in performing the exercise, you came up with a working solution, what you submitted does not constitute cheating.

Yes, this does involve some trickery, but it is creative trickery ...

len(text) - len(text) -1

You deserved and earned the point. :smile:


#5

Hi @appylpye

I just wanted to fix the bug if it is bug :smile:


#6

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