0
Alien Flip word challenge
In alien challenge, I was given a task to to flip a word of my choice in English language Please where did I get it wrong?? def reverse_string(string): if len(string) == 0: return string else: return reverse_string(string[1:]) + string[0] reverse_string("Python")
3 Antworten
+ 3
Proper indention was needed 😊
This could help you👇👇
https://code.sololearn.com/ce6VojhJj2Va/?ref=app
+ 1
Add identation to else part..
And
missing the printing of returned value.
+ 1
Hey Batubo Alafuro Just Correct Your Indentation Of else Part And Yes You Just Wanna Flip Your Word For This You Don’t Need To Define Function.
You Can Solve Your Problem With Lesser Space Complexity.
For Ex-
x=input()
print(x[::-1])