what's different about loop data with yield and without yield
This question already has an answer here:
Functionally, they're the same.
The main difference is that, in the second case, it's really easy to have several different "do something" blocks without repeating the SQL statement. In the first case, the "do something" is hard-coded.
链接地址: http://www.djcxy.com/p/1558.html上一篇: 关于Python中的生成器
下一篇: 循环数据的收益率和收益率有什么不同