n = int(raw_input("数列长度:"))def fibo(n): before = 0 after = 1 if n == 0 or n == 1: return n if n <= 3: return 1 return fibo(n-1)+fibo(n-2)print fibo(n)
def fab(n): if n<3: return 1 return fab(n-1)+fab(n-2)print fab(10)
python 2.7