You can download this code by clicking the button below.
This code is now available for download.
This function compresses the file at the specified input path into a zip format and saves it to the specified output path.
Technology Stack : zipfile
Code Type : File compression and decompression
Code Difficulty : Intermediate
def zipfile_create(input_path, output_path):
import zipfile
with zipfile.ZipFile(output_path, 'w') as zipf:
zipf.write(input_path, arcname=input_path)
return output_path