7/15 "An integer is rquired" Error

def reverse(text):
  lst = list(text)
  for char in lst:
  return str1

I am not sure what is wrong with my code and why it is yielding an error message “An integer is required”


if we look at the documentation:


we see that pop() removes an item from a given index, char is not an index.

which is why pop raises a type error, to indicate wrong data type argument


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.