# 元组Python中的斐波那契数列Fibonacci Sequence in tuple Python

``````def make_fibonacci(n):
a, b = 0, 1
for i in range(d):
a, b = b, a+b
``````

``````make_fibonacci(10)
>>> (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55)
``````

## 6 个回复6

### ===============>>#1 票数：3

``````def make_fibonacci(n):
a, b = 0, 1
for i in range(d):
a, b = b, a+b
``````

``````make_fibonacci(10)
>>> (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55)
``````

### ===============>>#2 票数：2

``````def make_fibonacci(n):
a, b = 0, 1
for i in range(d):
a, b = b, a+b
``````

``````make_fibonacci(10)
>>> (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55)
``````

### ===============>>#3 票数：2

``````def make_fibonacci(n):
a, b = 0, 1
for i in range(d):
a, b = b, a+b
``````

``````make_fibonacci(10)
>>> (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55)
``````

### ===============>>#4 票数：1 已采纳

``````def make_fibonacci(n):
a, b = 0, 1
for i in range(d):
a, b = b, a+b
``````

``````make_fibonacci(10)
>>> (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55)
``````

### ===============>>#5 票数：1

``````def make_fibonacci(n):
a, b = 0, 1
for i in range(d):
a, b = b, a+b
``````

``````make_fibonacci(10)
>>> (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55)
``````

### ===============>>#6 票数：0

``````def make_fibonacci(n):
a, b = 0, 1
for i in range(d):
a, b = b, a+b
``````

``````make_fibonacci(10)
>>> (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55)
``````

2回复

1回复

1回复

4回复

1回复

3回复

4回复

2回复

3回复

3回复