4 ms·itertools.count is probably what OP is looking forby qrian 11mo agoitertools.count is probably what OP is looking for