##斐波那契数列

f=[0,1]

for i in range(2,20):
a=f[i-1]+f[i-2]
f.append(a)
print(f)

 

效果图:

[Python]斐波那契数列

 

相关文章: