擅长:python、mysql、java
<blockquote>
<p>Also, because the information I'm looping are from a query to a
database, I can get the length of the information from there, but the
function I'm using has to return an iterator.</p>
</blockquote>
<p>假设你有一个很好的数据库,在那里进行计数。怀疑python中的任何解决方案都会更快/更干净。你知道吗</p>