Write a python function to generate Cube Numbers (1, 8, 27, 64, 125...)


Topic: Write a python function to generate Cube Numbers (1, 8, 27, 64, 125...)

Solution

def cube_numbers(n):
    for i in range(n):
        yield i **  3
            



List all Python Programs