[Python-il] [pyweb-il:1072] Python coding question

Haran Pilpel haranp at math.huji.ac.il
Wed Jul 7 10:23:57 IDT 2010


Gabor Szabo <szabgab at gmail.com> writes:

> Hi,
> 
> 
> > On Thu, Jul 1, 2010 at 5:35 PM, Dov Grobgeld <dov.grobgeld at gmail.com> wrote:
> >> Here's another pythonic construct that imo would look nicer.
> >>
> >>     f← λ x: x↑2
> >>     a←f〈2〉
> >>
> 
> I have not done any math for a long, long time. Would you mind explaining
> what would the above do?

f = lambda x: pow(x,2)
a = f(2)


More information about the Python-il mailing list