Since this is python, here is an infinite loop example using a generator.

I love this little bit of code, it is just so elegant in python.

def fib():
      a  = b = 1
      while True:
            yield a
            a, b = b, a + b

for x in fib():
     print x

On Fri, Oct 15, 2010 at 3:57 AM, Tsolmon Narantsogt <[email protected]>wrote:

> Hello list.
>
> What's infinite loop.
> How it make.
> Thanks
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Python Ireland" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<pythonireland%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/pythonireland?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Ireland" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pythonireland?hl=en.

Reply via email to