步骤:
1.准备一段要实现的代码,如下,是实现:将指定路径下的所有文件的完整路径打印出来
1 import os 2 3 welcome = """ 4 #################################################### 5 # # 6 # Ruirui‘s pyinstaller performance progrem # 7 # # 8 # ver.20210302 # 9 #################################################### 10 """ 11 print(welcome) 12 13 14 15 target_path = input("please input the target file_path :") 16 for root,dir,filename in os.walk(target_path): 17 for name in filename: 18 print(os.path.join(root,name))
2.
原文:https://www.cnblogs.com/RuiRuia/p/14468571.html