prev=1
current=1
print(current)
for i in range(1,12):
print(current)
next=prev+current
prev = current
current=next
结果如下:
1
1
2
3
5
8
13
21
34
55
89
144
prev=1
current=1
print(current)
for i in range(1,12):
print(current)
next=prev+current
prev = current
current=next
结果如下:
1
1
2
3
5
8
13
21
34
55
89
144