For...in statement and generators

Mark Tolonen metolone+gmane at gmail.com
Mon Dec 21 11:19:30 EST 2009


"Lucas Prado Melo" <lukepadawan at gmail.com> wrote in message 
news:9f4be2240912210639g58da0549jb0c81450947ef032 at mail.gmail.com...
> Is there a way to send() information back to a generator while using the
> for...in statement?
>
> Thanks in advance.

Yes, see "send(), (generator method)" or "yield expressions" in the help.

-Mark 





More information about the Python-list mailing list