You can download this code by clicking the button below.
This code is now available for download.
Create a zip file and add the specified input file to the zip file.
Technology Stack : zipfile
Code Type : File operation
Code Difficulty : Intermediate
def zipfile_create(input_file, output_file):
with zipfile.ZipFile(output_file, 'w') as zipf:
zipf.write(input_file, arcname=input_file)