PI. Function in function. Fibonacci, second implem

Run Settings
LanguagePython
Language Version
Run Command
def fib(n): def wrapped(): a, b = 0, 1 while a < n: print a, a, b = b, a + b return wrapped func = fib(100) print func print "\nCall of func:" func() print "\nDirect call:" fib(150)()
Editor Settings
Theme
Key bindings
Full width
Lines