Comment Comment by yydcool python has this: def function(): for i in range(10): yield i parent yydcool 7 years ago