def fib(n): if n == 0 or n == 1: return n return fib(n-1) + fib(n-2) # 0 1 1 2 3 5 8 13 21 print(fib(8))
python 斐波那契数列
原文:https://www.cnblogs.com/benben-wu/p/12093840.html