python 批量重命名
记录下批量重命名的代码。n主要运用了os模块的listdir和rename函数。nimport os # 导入os模块nfrom tqdm import tqdm # tqdm进度条模块ntrain_path = ‘input/train/’nmask_path = ‘input/train_masks/’nntrain_ids = os.listdir(train_path)nmask_ids…
记录下批量重命名的代码。n主要运用了os模块的listdir和rename函数。nimport os # 导入os模块nfrom tqdm import tqdm # tqdm进度条模块ntrain_path = ‘input/train/’nmask_path = ‘input/train_masks/’nntrain_ids = os.listdir(train_path)nmask_ids…