You are viewing a single comment's thread. Return to all comments →
def fibonacci(n): numbers = [] a, b = 0, 1 for i in range(n): numbers.append(a) a, b = b, a+b return numbers
cube = lambda x: x**3
Seems like cookies are disabled on this browser, please enable them to open this website
Map and Lambda Function
You are viewing a single comment's thread. Return to all comments →
def fibonacci(n): numbers = [] a, b = 0, 1 for i in range(n): numbers.append(a) a, b = b, a+b return numbers
cube = lambda x: x**3