You can download this code by clicking the button below.
This code is now available for download.
Create a ZIP file and add a specified file to it.
Technology Stack : zipfile, os
Code Type : File operation
Code Difficulty : Intermediate
def zipfile_create(arg1, arg2):
import zipfile
import os
with zipfile.ZipFile(arg1, 'w') as zipf:
zipf.write(arg2, os.path.basename(arg2))