Skip to content

Instantly share code, notes, and snippets.

@adammenges
Created Mar 17, 2014
Embed
What would you like to do?
nth fib
def fib(n):
return reduce(lambda x, y: [x[1], x[0] + x[1]], xrange(n-2), [0, 1])[1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment