Program - Create a Generator


Topic: Program - Create a Generator

Solution

def generator(n=100000):
    my_gen = (i for i in range(n) if i % 5 == 0)
    return my_gen



List all Python Programs