若不包含子目录的遍历:
除了os中的一些方法外,还有以下方法。
1
2
3
4
|
import
glob
for
filename
in
glob.glob(
"f:/py/*.exe"
):
print
filename
否则可以:
|