Skip to content

Instantly share code, notes, and snippets.

@Sadamingh
Created September 3, 2020 10:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sadamingh/408702c64eefc374d884970172fca87d to your computer and use it in GitHub Desktop.
Save Sadamingh/408702c64eefc374d884970172fca87d to your computer and use it in GitHub Desktop.
def reverse_string(string: str) -> str:
if string == "":
return ""
else:
return string[-1] + reverse_string(string[:-1])
reverse_string("stressed")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment