Hi everyone, I use the French version and I have also tried with French variable names but the result is the same. We all know that a picture is worth a thousand words :
Looks fine to me. Try refreshing the page and submitting again.
I tried like a thousand things different (including refreshing the page) but still the same result... Maybe this part of the course doesn't work well !?!
Strange...Your code worked in the English version.
Perhaps change your
inverser(texte) with all
text being replaced to
texte. I'm also seeing this in the French version. Exact same code but that error message pops up. I even tried changing browsers but that didn't help. Perhaps it doesn't work well. The code looks fine. I suggest you move on.
- You may not use reversed or [::-1] to help you with this.
Reading is hard.
Yes, but they didn't use
def inverser(texte): result="" for e in range(len(texte)-1,-1,-1): result+=texte[e] return result print inverser("Python!")
The answer is good but there is a error message
new_string = 
index = len(text)
index -= 1
return "". join(new_string)
hope this code will help
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.