Skip to content

Instantly share code, notes, and snippets.

@Restuta
Created May 5, 2014 18:52
Show Gist options
  • Save Restuta/11544592 to your computer and use it in GitHub Desktop.
Save Restuta/11544592 to your computer and use it in GitHub Desktop.
Helen's poor attempt with Python
def reverse_string(list):
list_length = len(list)
for i in range(0, list_length//2, 1):
temp_letter = list[i]
list[i] = list[list_length - i - 1]
list[list_length - i - 1] = temp_letter
return list
new_string = 'ejahdjb ajebdsjb j,awbed ,ajwebdj'
print reverse_string(new_string)
i = 3
print new_string[0]
print new_string[i - 2]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment