6 ms·itertools.count is probably what OP is looking forby qrian 10mo agoitertools.count is probably what OP is looking for