tabulate¶
-
sknano.core.itertools.
tabulate
(function, start=0)[source] [edit on github][source]¶ Return an iterator mapping
function
over linear input.Returns function(0), function(1), ...
Parameters: Returns: Return type: Examples
>>> from sknano.core import tabulate, ordinal_form, take >>> t = tabulate(ordinal_form, 10) >>> take(5, t) ['10th', '11th', '12th', '13th', '14th'] >>> take(5, t) ['15th', '16th', '17th', '18th', '19th'] >>> t = tabulate(ordinal_form) >>> take(5, t) ['0th', '1st', '2nd', '3rd', '4th'] >>> take(5, t) ['5th', '6th', '7th', '8th', '9th']