You are viewing a single comment's thread. Return to all comments →
cube = lambda x: x*x*x def fibonacci(n): a = 0 b = 1 res = [] for i in range(n): res.append(a) c = a+b a = b b = c return res 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 →
For Python3 Platform