def unzip(source_filename, dest_dir):
    with zipfile.ZipFile(source_filename) as zf:
        for member in zf.infolist():
            words = member.filename.split('/')
path = dest_dir
for word in words[:-1]:
    while True:
        drive, word = os.path.splitdrive(word)
head, word = os.path.split(word)
if not drive:
    break
How to unzip file in Python on all OSes?