Program - Generator using yield function


Topic: Program - Generator using yield function

Solution

def generator_yield(n=100000):
    for i in range(n):
        if i % 5 == 0:
            yield i



List all Python Programs