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:
- Import zipfile package to read the zip file.
- Get the file names contained in the zip file.
- Choose a file contained to open.