# Lesson 14 "Try It!"

#1

Hello i have seen i have the correct outcome (I think), But however codecademy does not say this is right, i have tried this:

squares = [x**2 for x in range(1,11)]
filter(lambda x: x >=30 and x <=70, squares)

print squares

Which prints out: [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]

I have looked in the forums and there was someone that used another method such as:

squares = [x**2 for x in range(1,11)]
filter(lambda x: x in range(30,71), squares)

This printed out the same as above.

Maybe this is a bug or something?

Any help would be appreciated!

Mike.

#2

Sorry i forgot to mention, this was the error message that followed:

"Oops, try again. It looks like you didn't print the correctly filtered list to the console."

#3

"print" statement solves the problem

print filter(lambda x: x >= 30 and x <=70, squares)

#4

Aah okay I see, haha Thank you for your help!

#5

this work

#6

It is a bug
let me explain why I think so:
`print filter(lambda x: x >=30 and x <=70,squares)` works but `filter(lambda x: x >=30 and x <=70,squares)` gives an error???
Same goes for `print filter(lambda x: x in range(30, 71), squares)` and `filter(lambda x: x in range(30, 71), squares)` too.

#7

Thanks for explaining, I found out already, I just forgot the "print" statement and that's why it said I did not print our the correct list Thanks for your help

#8

I was lookingn forever for this little error haha. Thanks so much

#9

No problemo! Hahah :3