Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Elegant as fuck

Name: Anonymous 2011-05-15 20:42

def fib(times):
    a, b = 0,1
    for _ in range(times):
        a, b = b, a+b
    return a


I think I just creamed my pants.

Name: Anonymous 2011-05-17 0:12

First, for the second command, you would use fibs !! 1000000000, as fibs is a list, not a function.
Second, the space requirements will literally murder your computer, as the system allocates a billion bignums.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List