python斐波那契数列前50项
时间: 2023-11-07 22:26:44 浏览: 92
python 排列前500斐波那契额数列
Sure! Python code for generating the first 50 terms of the Fibonacci sequence is:
fibonacci = [0, 1]
for i in range(2, 50):
fibonacci.append(fibonacci[i-1] + fibonacci[i-2])
print(fibonacci)
Hope that helps!
阅读全文