terate over itself again. Am I understanding
generators correctly?
4.) Is it correct to say that a generator is a function that returns
multiple values and iterates over itself?
Thanks in advance for any feedback/help.
Rumpy.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
e over itself again. Am I understanding
generators correctly?
4.) Is it correct to say that a generator is a function that returns
multiple values and iterates over itself?
Thanks in advance for any feedback/help.
Rumpy.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hi Wesley,
Thank you very much for the feeback. It helped a lot!
Quoting wesley chun <[EMAIL PROTECTED]>:
>> def lines(file):
>>for line in file: yield line
>>yield '\n'
>>
>> del blocks(file):
>>block = []
>>for line in lines(file):
>>if line.strip():
>> bloc
er delves
into areas of expertise where I have limited knowledge.
Is there a set of more basic projects for flexing one's novice Python skills?
Regards,
Rumpy.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor