Как разкапливать файлы с помощью модуля Zipfile Python
import zipfile
with zipfile.ZipFile("file.zip","r") as zip_ref:
zip_ref.extractall("targetdir")
Muddy Millipede
import zipfile
with zipfile.ZipFile("file.zip","r") as zip_ref:
zip_ref.extractall("targetdir")
import zipfile
with zipfile.ZipFile(path_to_zip_file, 'r') as zip_ref:
zip_ref.extractall(directory_to_extract_to)
# app.py
from zipfile import ZipFile
with ZipFile('Mail3.zip', 'r') as zipObj:
# Extract all the contents of zip file in different directory
zipObj.extractall('temp')
print('File is unzipped in temp folder')