Udacity paython

can someone correct it to me the code do not work

You are required to complete the function reverse(x). given a string “x” as an input it is expected to return that same string but reversed.

### Example:

#### input : "again"

#### output: "niaga"

##### you can change the string value in the variable  `text`  but you are not allowed to change the variable names or edit any other code, except the function's body, doing so may jeopardize your evaluation

text = "this is not a reversed text"
def reverse(x):
       #complete this function so that it takes string x as an input
      #and returns its reverse 
      str="" 
      for i in x: 
              str = i+str 
      return str
print("the reversed text is: "+reverse(text))

Do you have a question? What should the code do that it is not doing currently?

given a string “x” as an input it is expected to return that same string but reversed like in the example but the code is not right i do not know why
input : “again”
output: “niaga”

Your function is returning the reverse of the string passed, so why do you think it is not working?