Ethiopian multiplication: Difference between revisions

m
Line 2,389:
 
Using some features which Python has for use in functional programming. The example also tries to show how to mix different programming styles while keeping close to the task specification, a kind of "executable pseudocode".
Note: Although the definition of column2 could theoretically generate a sequence of infinite length, izip will stop producing values (and so provide the necessary stop condition) when any of the iterables given as arguments (in this case column1) have no more values.
When not using the tutor, table will be a generator, which is efficient and does not store intermediate values.
 
Anonymous user