Hey there all you Python students (and hopefully Codecademy mods/devs),
There may be a bug in the lesson, "Lambda Expressions".
The preloaded code in the editor is:
garbled = "IXXX aXXmX aXXXnXoXXXXXtXhXeXXXXrX sXXXXeXcXXXrXeXt mXXeXsXXXsXaXXXXXXgXeX!XX"
The code which I entered just below the preloaded code is:
print filter(lambda x: x != "X", garbled)
...which, when run, yields to the console:
I am another secret message! None
...which should be correct, however I receive the error:
"Oops, try again. It looks like your message is "I am the secret message!" instead of "I am another secret message!""
...when indeed my result was, "I am another secret message!" as per the provided garbled string in the preloaded code. The workaround I have found is to actually produce the output, "I am the secret message!" even though the error message explicitly states that this is incorrect. I accomplished this by removing "aXXXnXoXXXXX" from before "tXhXe" and "XXXXrX" from after it in the provided garbled string.
If I have made a mistake, I would appreciate it being pointed out to me! If this is truly a bug, then it would appear that the Codecademy devs would need to fix the answer check function for this lesson.
Is anyone else seeing this?