In this case the variable
reversed_string
is only known within the bounds of the
reverse
function. You need call reverse with a string as an argument e.g.
print( reverse("Hello World!") )
But in order for that to work you'll need return
reversed_string
before exiting the
reverse
function.
Then you will have to figure out why your reverse function returns
None
.