![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
文章平均质量分 69
acesysu
这个作者很懒,什么都没留下…
展开
-
Python yield
纯复制黏贴,原文在这:http://blog.csdn.net/preterhuman_peak/article/details/40615201如何生成斐波那契數列斐波那契(Fibonacci)數列是一个非常简单的递归数列,除第一个和第二个数外,任意一个数都可由前两个数相加得到。用计算机程序输出斐波那契數列的前 N 个数是一个非常简单的问题,许多初学者都可以轻易写出如下函数:转载 2015-04-06 11:49:18 · 336 阅读 · 0 评论 -
The best way to deal with large files in Python style
with open(...) as f: for line in f: The with statement handles opening and closing the file, including if an exception is raised in the inner block. Thefor line in f treats the file原创 2015-04-07 15:00:50 · 469 阅读 · 0 评论