Skip to content

Instantly share code, notes, and snippets.

@gnn
Last active December 1, 2020 13:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gnn/53f7fe609059466ecde020f4d62da0dd to your computer and use it in GitHub Desktop.
Save gnn/53f7fe609059466ecde020f4d62da0dd to your computer and use it in GitHub Desktop.
Using zipped files with Python
import os
import zipfile
with zipfile.ZipFile(PATH_TO_ZIPFILE) as zf:
for filename in zf.namelist():
zf.extract(filename)
# Do stuff with `filename`.
os.remove(filename)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment