files = os.listdir(working_folder)
files_py = []
for f in files:
    if f.endswith('py'):
        fff = os.path.join(working_folder, f)
files_py.append(fff)
ZipFile = zipfile.ZipFile('zip testing3.zip', 'w')
for a in files_py:
    ZipFile.write(os.path.basename(a), compress_type=zipfile.ZIP_DEFLATED)
Using Python to add a list of files into a zip file