0
Zipping files?
Guys i have a university lab task, i did the Spyder coding questions and placed them in a file. How do i zip the fike so i can upload it to moodle?
2 Réponses
+ 1
import zipfile, os
os.chdir('your/directory/location') # <<<<<<
newZip = zipfile.ZipFile('.zip', 'w')
# ^^^ name your zipfile
newZip.write('', compress_type=zipfile.ZIP_DEFLATED)
# ^^^ inter your file name here
newZip.close()
+ 1
File or directory zipper
You have to choose the location where you want your file to be saved before doing anything
https://code.sololearn.com/cxNt077Xzm1Q/?ref=app