写一个Python程序来生成指定数量的斐波那契数列。
数量: 10
```python
a, b = 0, 1
count = 0
n = 10
while count < n:
    print(a, end=' ')
    nth = a + b
    a = b
    b = nth
    count += 1
```
输出：

```
0 1 1 2 3 5 8 13 21 34
```