1、查看压缩文件的文件名内容
import zipfile
with zipfile.ZipFile("my_zip.zip") as z:
# 返回一个压缩文件内容的列表
print(z.namelist())
2、将压缩文件解压到folder文件夹
unzip zip_name -d folder
1、查看压缩文件的文件名内容
import zipfile
with zipfile.ZipFile("my_zip.zip") as z:
# 返回一个压缩文件内容的列表
print(z.namelist())
2、将压缩文件解压到folder文件夹
unzip zip_name -d folder