From 26c490f404731d053a6205719b6246502c07b449 Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Sat, 14 Jun 2014 16:46:27 +0200 Subject: init --- algorithms/string_reverse.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 algorithms/string_reverse.py (limited to 'algorithms/string_reverse.py') 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)]) + -- cgit v1.2.3