Generators for Engineers

A gentle introduction to infinite sequences.

Comments are moderated. It may take a few minutes before your comment appears.
Markdown is supported in your comments.

>>> data_list = xrange(10)
>>> previous = 0
>>> for datum in data_list:
...     print (datum - previous) * 0.5,
...     previous = datum
0.0 0.5 1.5 2.5 3.5 4.5 5.5 6.5 7.5 8.5
Name:
Mail: (not shown)

Please type this: