[newbie] lambda operator

asked 2013-08-15 00:36:24 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Can someone explain me the lambda operator. The first time I saw it was in this code fragment: pi = lambda x: pari(x).primepi()

I do understand pi(x) calculates the number of primes =< x but I don't understand the syntax used to accomplish this

thanks for having patience with a newbie jean

edit retag flag offensive close merge delete



This was answered [here](https://groups.google.com/forum/#!topic/sage-support/alhml56_azc).

kcrisman gravatar imagekcrisman ( 2013-08-15 03:10:20 -0600 )edit

I like this explanation on Python Foundation page.

etb gravatar imageetb ( 2016-09-23 04:53:30 -0600 )edit