I want to use this post to show you how to read a zip file directly in Python without decompressing the file or knowing the file name contained, which could take a while and/or crash your computer.

The code below is pretty self-explanatory:

  1. Import zipfile package to read the zip file.
  2. Get the file names contained in the zip file.
  3. Choose a file contained to open.