with zipfile.ZipFile('/Users/liujianing/Downloads/a.zip') as z: for file in z.namelist(): z.extract(file, '/Users/liujianing/Downloads')