We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e4a13b commit 0b2d024Copy full SHA for 0b2d024
HelpMaterial/organizingFiles.py
@@ -96,3 +96,19 @@
96
97
# Extracting from ZIP Files
98
99
+import zipfile, os
100
+exampleZip = zipfile.ZipFile('/home/rango/Downloads/Create-a-blog.zip')
101
+#extract file to /home/rango/Download
102
+exampleZip.extractall('/home/rango/Downloads')
103
+exampleZip.close()
104
+
105
+# Creating and Adding to ZIP Files
106
+import zipfile
107
108
+# create a new ZIP file named new.zip that compresses contents of spam.txt
109
+newZip = zipfile.ZipFile('new.zip','w')
110
+newZip.write('spam.txt', compress_type=zipfile.ZIP_DEFLATED)
111
+newZip.close()
112
113
114
0 commit comments