You can download this code by clicking the button below.
This code is now available for download.
Add a specified file to a zip archive.
Technology Stack : zipfile
Code Type : File operation
Code Difficulty : Intermediate
def zip_file(arg1, arg2):
import zipfile
with zipfile.ZipFile(arg1, 'w') as zipf:
zipf.write(arg2, arcname=arg2)
return zipf