Can python find fibonacci series in a single line of code?

Mads Sejersen Psyco at mailme.dk
Mon Nov 11 15:34:38 EST 2002


> My Perl-addicted friend shows me that he can find fibanicci series in
> a single line of code.
>
> perl -le '$b=1; print $a+=$b while print $b+=$a'
>
> can python do something like this?

Goto http://www.python.org/cgi-bin/faqw.py and search for lambda



More information about the Python-list mailing list