Reverse what am i missing?


#1

https://www.codecademy.com/courses/learn-python/lessons/practice-makes-perfect/exercises/reverse?action=lesson_resume

Does your reverse function take exactly one argument (a string)? Your code threw a “an integer is required” error.

I expect it to work, but it isn’t. It probably has something to do with the insert method, but I don’t know why.

def reverse(text):
  ml = []
  ls = list(text)
  for i in ls:
    ml.insert([0], i)
  rev = "".join(ml)
  print rev
  return rev


#2

Ok I just figured it out while going to some things about the .insert method. I used [0] as location indicator, but it should have been just 0 (without the brackets)


#4