Skip to content

Instantly share code, notes, and snippets.

@ogilviemt
Created December 9, 2014 04:37
Show Gist options
  • Select an option

  • Save ogilviemt/6f7f8602dfee46a15778 to your computer and use it in GitHub Desktop.

Select an option

Save ogilviemt/6f7f8602dfee46a15778 to your computer and use it in GitHub Desktop.
coderbyte question 1
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