They are wanting you to use lambda expressions instead of defining a function. This is my code maybe you can work backwards from it to see how I was thinking.
garbled = "IXXX aXXmX aXXXnXoXXXXXtXhXeXXXXrX sXXXXeXcXXXrXeXt mXXeXsXXXsXaXXXXXXgXeX!XX"
message = filter(lambda x: x is not "X", garbled)
But to fix your function:
garbled = "IXXX aXindent preformatted text by 4 spacesXmX aXXXnXoXXXXXtXhXeXXXXrX sXXXXeXcXXXrXeXt mXXeXsXXXsXaXXXXXXgXeX!XX"
message = ""
for char in garbled:
if char != 'X':
message += char
Your syntax was probably a bit off, your "return message" needed to be in line with your "for" loop. I also found that if you want to print to the console it's better to print before returning or call for print when you call your function.
Hope this helped you mate and good luck!