1from os import getcwd # only import "getcwd" from os
2
3getcwd() # Get the current working directory
1import zipfile
2inpath = MyDirPath
3outpath = inpath.replace(".zip", "") # Remove zip extension so that outpath does not have .zip
4 with zipfile.ZipFile(inpath, 'r') as z:
5 z.extractall(outpath) # Extracts