Create an example folder with files

%%shell
mkdir test
touch test/file1.txt
touch test/file2.txt

Zip a folder

import shutil
dir_name = '/content/test/'
output_filename = 'test'
shutil.make_archive(output_filename, 'zip', dir_name)
'/content/test.zip'

Unzip a file

import zipfile
path_to_zip_file ='/content/test.zip'
directory_to_extract_to = '/content/test1/'
with zipfile.ZipFile(path_to_zip_file, 'r') as zip_ref:
    zip_ref.extractall(directory_to_extract_to)

use the code below to delete your zip file if needed:

import os
if os.path.exists(path_to_zip_file):
    os.remove(path_to_zip_file)