I have a problem about making a fibonacci sequence to a list, I\'m just new to python someone help me please.
This is my code. I know this is looking wrong or somet
You may want this:
In [77]: a = 0
...: b = 1
...: while b < 700:
...: a, b = b, a+b
...: print a, b
1 1
1 2
2 3
3 5
5 8
8 13
13 21
21 34
34 55
55 89
89 144
144 233
233 377
377 610
610 987
If you wanna store the results in a list, use list.append:
In [81]: a = 0
...: b = 1
...: fibo=[a, b]
...: while b < 70:
...: a, b = b, a+b
...: fibo.append(b)
...: print fibo
[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]