Answers for "how to extract zip file and read each file inpython"

0

how to save unzipped files in python

import zipfile
def un_zipFiles(path):
    files=os.listdir(path)
    for file in files:
        if file.endswith('.zip'):
            filePath=path+'/'+file
            zip_file = zipfile.ZipFile(filePath)
            for names in zip_file.namelist():
                zip_file.extract(names,path)
            zip_file.close()
Posted by: Guest on June-26-2020

Code answers related to "how to extract zip file and read each file inpython"

Python Answers by Framework

Browse Popular Code Answers by Language