请输出fibonacci数列的前10项python
时间: 2023-06-07 17:07:58 浏览: 68
打印Fibonacii数列前10个元素
Sure! Here are the first 10 terms of the Fibonacci sequence in Python:
```
a, b = 0, 1
for i in range(10):
print(a)
a, b = b, a + b
```
Output:
```
0
1
1
2
3
5
8
13
21
34
```
阅读全文