python extract zip file without directory structure

import zipfile

archive = zipfile.ZipFile('')

for file in archive.namelist():
    if file.startswith('foo/'):
        archive.extract(file, 'destination_path')

Here is what the above code is Doing:
1. Open the zip file
2. Iterate over the files in the archive
3. If the file starts with ‘foo/’, extract it to the destination path