Skip to content

Commit 6937a6d

Browse files
committed
Changes made in the extract folder
1 parent 2fccd44 commit 6937a6d

File tree

4 files changed

+3
-18
lines changed

4 files changed

+3
-18
lines changed

Python/Extract_Contents_of_Zip/Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ python script.py
1010
## Screenshot
1111
After running the script we will find the extracted file in the current directory.
1212

13-
![demo](https://user-images.githubusercontent.com/56690856/99091832-6add4280-25f6-11eb-999d-86d8b5794d57.png)
13+
![demo](https://user-images.githubusercontent.com/56690856/99141235-5b4e1000-266f-11eb-8798-a0315a0f834c.png)
-787 Bytes
Binary file not shown.

Python/Extract_Contents_of_Zip/extractScript.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

Python/Extract_Contents_of_Zip/script.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ def main():
44
# Enter the name of zip file
55
zipFile = input("Enter zip file:")
66
# Enter the path of the file to be extracted
7-
extractFile = input("Enter path of the file:")
87
print("Extracted file in ZIP to current directory")
98
# create a ZipFile object in READ mode and name it as zipObj
109
with ZipFile(zipFile, 'r') as zipObj:
11-
# extract() method is used to extract any file by specifying its path in the zip file
12-
zipObj.extract(extractFile);
10+
# extractall the files from a zip file
11+
zipObj.extractall();
1312

1413
if __name__ == '__main__':
1514
main()

0 commit comments

Comments
 (0)