MCPcopy Create free account
hub / github.com/BeeBombshell/Python-DSA / reverse

Function reverse

Recursion/Reversing a string using Recursion.py:1–7  ·  view source on GitHub ↗
(word)

Source from the content-addressed store, hash-verified

1def reverse(word):
2 size = len(word)
3 if size == 0 :
4 return
5 last_char = word[size-1]
6 print(last_char,end='')
7 return reverse(word[0:size-1])
8
9reverse('hello there')

Calls

no outgoing calls

Tested by

no test coverage detected