How to unzip a file in Python

Unzipping a file extracts its contents into the current directory.

Solution for How to unzip a file in Python : You can use zipfile.ZipFile.extractall() to unzip a file Call zipfile.Zipfile(file, mode) with mode as “r” to unzip and open file for reading. Use zipfile.ZipFile.extractall() to extract its contents into the current directory.


how-to-unzip-a-file-in-python