summaryrefslogtreecommitdiff
path: root/algorithms/string_reverse.py
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-06-14 16:46:27 +0200
committerPatrick Simianer <p@simianer.de>2014-06-14 16:46:27 +0200
commit26c490f404731d053a6205719b6246502c07b449 (patch)
tree3aa721098f1251dfbf2249ecd2736434c13b1d48 /algorithms/string_reverse.py
init
Diffstat (limited to 'algorithms/string_reverse.py')
-rwxr-xr-xalgorithms/string_reverse.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/algorithms/string_reverse.py b/algorithms/string_reverse.py
new file mode 100755
index 0000000..1cebda4
--- /dev/null
+++ b/algorithms/string_reverse.py
@@ -0,0 +1,7 @@
+#!/usr/bin/env python2
+
+
+s = "Madam"
+print s
+print ''.join([s[i] for i in range(len(s)-1, -1, -1)])
+