Discuss / Python / 第二题

第二题

Topic source

咕咕111111

#1 Created at ... [Delete] [Delete and Lock User]

def search_name(name, path): for x in os.listdir(path): if x == 'System Volume Information': break join_path = os.path.join(path, x) if os.path.isfile(join_path): # 判断是否是文件 if os.path.splitext(x)[0] == name: print(join_path) else: search_name(name, join_path)

咕咕111111

#2 Created at ... [Delete] [Delete and Lock User]

break 改成 continue


  • 1

Reply