Answers for "unzip a zip in python"

5

how to unzip files using zipfile module python

import zipfile
with zipfile.ZipFile("file.zip","r") as zip_ref:
    zip_ref.extractall("targetdir")
Posted by: Guest on May-07-2020
1

unzip files python

method = 'a'
from zipfile import ZipFile

with ZipFile(file_directory, 'r') as zip:
  zip.printdir()
  zip.extractall(save_directory)

method = 'b'
unzip -o file.zip
Posted by: Guest on June-04-2021

Python Answers by Framework

Browse Popular Code Answers by Language