Program - Create a list comprehension


Topic: Program - Create a list comprehension

Solution

def listcompr(n=100000):
    my_list = [i for i in range(n) if i % 5 == 0]
    return my_list



List all Python Programs