擅长:python、mysql、java
<p>迭代文件的一种更为python的方法是使用<a href="http://docs.python.org/2/library/glob.html" rel="nofollow">^{<cd1>}</a>模块。你知道吗</p>
<pre><code>>>> import glob
>>> for f in glob.iglob('[0-9][0-9].txt'):
print f
01.txt
02.txt
03.txt
</code></pre>