How to read contents of zip file in Python

Code Yarns 👨‍💻

Reading the contents of files inside a zip file is easy with Python. We can use the zipfile module to achieve this. Open the zip file using the ZipFile constructor. Get the list of files inside it using infolist() and open each of those files using open(). After that you can read from it just like a normal file.

Tried with: Python 2.7.3

View original post