Created
December 9, 2014 04:37
-
-
Save ogilviemt/6f7f8602dfee46a15778 to your computer and use it in GitHub Desktop.
coderbyte question 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def FirstReverse(str): | |
| array = list(str) | |
| length = len(array) - 1 | |
| reverse = [] | |
| while length > 0: | |
| for char in array: | |
| reverse.append(array[length]) | |
| length -= 1 | |
| value = ''.join(reverse) | |
| return value | |
| # keep this function call here | |
| # to see how to enter arguments in Python scroll down | |
| print FirstReverse(raw_input()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment