把内容过程中比较重要的一些内容段备份一次,下边内容内容是关于python搜索指定目录的演示的内容,希望对各位有较大用处。
import os
for root, dirs, files in os.walk( os.curdir ):
print( "root = " + root )
for file in files:
print( "file = " + file )
for dir in dirs:
print( "dir = " + dir )
print( "n" )
input( 'nnPress Enter to exit...' )
网友评论