Python function to return the cubes of a list of numbers


Topic: Python function to return the cubes of a list of numbers

Solution

def cube(n):
   return [i*i*i for i in range(n)]



List all Python Programs