Try It! (Lambda stuff, thoughts, criticism


#1


Getting used to using the lambda expression, but I'm wondering if there might be a better way to do complete this algorithm?

Why would we want to use lambdas anyway? Wouldn't making a separate function be a better idea in the long run?

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

print filter(lambda i: i > 29 and i < 71, squares)


#2

yea, guido van rossum wanted to remove lambda. see here, it should answer your question


#3

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