2 ms·python has this: def function(): for i in range(10): yield iby yydcool 8y agopython has this: def function(): for i in range(10): yield i