#coding:utf8 import os for muluName,zimuluName,fileName in os.walk("H:\\LK"): for zimulu in zimuluName: print "目录:"+muluName+" 中的子目录:"+zimulu for file in fileName: print "目录:"+muluName+" 中的文件 :"+file print ''
#coding:utf8 import os for muluName,zimuluName,fileName in os.walk("H:\\LK"): for zimulu in zimuluName: print "目录:"+muluName+" 中的子目录:"+zimulu for file in fileName: print "目录:"+muluName+" 中的文件 :"+file print ''
0则评论给“python 目录遍历”