We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Map and Lambda Function
Map and Lambda Function
Sort by
recency
|
481 Discussions
|
Please Login in order to post a comment
Here's my code:
cube = lambda x:x**3
def fibonacci(n): # return a list of fibonacci numbers f = [0] a, b = 0, 1
if name == 'main': n = int(input()) print(list(map(cube, fibonacci(n))))
I tried to write my code as comprehensible as possible!