import os# 列出指定目录中的所有文件和子目录files = oslistdirrCUsersLenovoDesktop河北bendibao河北省for file in files # 解码文件名 decoded_file = file printdecoded_file输出文件名字应该怎么更改代码
要输出文件名字,你可以使用print函数来打印变量decoded_file的值。代码已经包含了打印语句,所以你不需要进行任何更改。运行代码后,文件名字将会被打印出来。
 
原文地址: http://www.cveoy.top/t/topic/iMLy 著作权归作者所有。请勿转载和采集!