PyEuler
Arnaud Delobelle
arnodel at googlemail.com
Mon Feb 25 16:24:05 EST 2008
More information about the Python-list mailing list
Mon Feb 25 16:24:05 EST 2008
- Previous message (by thread): PyEuler
- Next message (by thread): PyEuler
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Feb 25, 7:25 pm, Paul Rubin <http://phr...@NOSPAM.invalid> wrote: > Are you kidding? > def ggenfib(): > a,b = 1,2 > while True: > yield a > a,b = b, a=b Or: def genfib(a=0, b=1): for a, b in iter(lambda:(b, a+b), None): yield a ;-) Ahem. I admit that somehow, I am proud of this. -- Arnaud
- Previous message (by thread): PyEuler
- Next message (by thread): PyEuler
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list