Why is my code not working?


Advanced Topics 18. Lambda Expressions

This is the error message I got.

"Oops, try again. It looks like your message is "I am the secret message!" instead of "I am another secret message!""

The output of my code is this.

I am another secret message!

This is my code.

print filter(lambda x: x != 'X', garbled)

Why is this not working?


you tried to shortcut, you should store the result of the filter action in a variable which should be named message. then on the next line, print message.

Sometimes trying a shortcut/shorthand will create problems in the lesson


Thank you! The error message was a bit confusing though but I went back and it was fixed. I'll try and read the lesson instructions better from now on.