Lambdas "Try it"


#1



https://www.codecademy.com/en/courses/python-beginner-en-KAgt5/3/3?curriculum_id=4f89dab3d788890003000096#


File "python", line 2
print filter(lambda x: x >=30 and x<=70, languages)
^
SyntaxError: invalid syntax


I expect it to print


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


#2

look at your square brackets on line 1


#3

I'm having the same issue with my code :slight_smile:

squares = [x**2 for x in range(0,11)]

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


#4

Oh wait I spelled filter wrong!


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.