import os,shutil
path=r'C:\Users\Lenovo\Desktop\2' #解压桌面上‘2’文件夹内的7z压缩包
os.chdir(path)
shutil.unpack_archive('测试.7z',format='7z')
import os,shutil
path=r'C:\Users\Lenovo\Desktop\2' #解压桌面上‘2’文件夹内的7z压缩包
os.chdir(path)
shutil.unpack_archive('测试.7z',format='7z')