标签:int result 斐波那契数 end print return pytho nbsp for
def fibs(num):
result=[0,1]
for i in range(num-2):
result.append(result[-2]+result[-1])
return result
print fibs(9)
标签:int result 斐波那契数 end print return pytho nbsp for
原文地址:http://www.cnblogs.com/jietingting/p/7076856.html