You are viewing a single comment's thread. Return to all comments →
def fibonacci(n): a = 0 b = 1 c = [] for i in range(1,n+1): c.append(a) d = a + b a = b b = d return c cube = (lambda x: (x**3)) if __name__ == '__main__':
n = int(input()) print(list(map(cube, fibonacci(n))))
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 →