After several hours of trial and error/improvement, I got this code to work. This is not the classic code elsewhere. I am not sure why it works. Can someone be kind enough to explain why it works. Thank you.
garbled = "IXXX aXXmX aXXXnXoXXXXXtXhXeXXXXrX sXXXXeXcXXXrXeXt mXXeXsXXXsXaXXXXXXgXeX!XX" message = filter(lambda n:n if n!="X" else " " ,garbled) print message