Skip to content

Instantly share code, notes, and snippets.

@kalinchernev
Created November 25, 2014 21:16
Show Gist options
  • Save kalinchernev/86af74d3cfd6e7421de1 to your computer and use it in GitHub Desktop.
Save kalinchernev/86af74d3cfd6e7421de1 to your computer and use it in GitHub Desktop.
Reverse chars of a string
def reverse(string):
buffer = []
for char in string:
buffer.insert(0, char)
reversed = ''.join(buffer)
return reversed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment