Learning Python

kangshufan at hotmail.com kangshufan at hotmail.com
Wed Aug 24 12:03:39 EDT 2011


Hi all
could some one help me?
there is a piece of code:

def fib(x):
    if x==0 or x==1: return 1
    else: return fib(x-1) + fib(x-2)

Could some one explain it for me? I can't understand how it works.



More information about the Python-list mailing list