I don't understand why this code doesn't work:
def reverse(string):
rev_string = []
for c in range(len(string)):
rev_string[c]=string[(len(string))-c]
str(rev_string)
return rev_string
print(reverse("google"))
and throws this error message:
IndexError: string index out of range