You are viewing a single comment's thread. Return to all comments →
def fibonacci(n): l = [] [l.append(l[i - 1] + l[i - 2]) if i >= 2 else l.append(i) for i in range(0, n)] return l
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): l = [] [l.append(l[i - 1] + l[i - 2]) if i >= 2 else l.append(i) for i in range(0, n)] return l