📜  要压缩 python 代码示例的文件列表

📅  最后修改于: 2022-03-11 14:45:08.269000             🧑  作者: Mango

代码示例1
import zipfile

lista_files = ["12.csv","13.csv","14.csv"]
with zipfile.ZipFile('out.zip', 'w') as zipMe:        
    for f in lista_files:
        zipMe.write(f, compress_type=zipfile.ZIP_DEFLATED)