python学习--斐波那契函数

def fib(n):
 if n==1:
  return 1
 elif n==2:
  return 1
 else:
  return fib(n-1)+fib(n-2)

你可能感兴趣的:(python,python)