from zipfile import ZipFile
with ZipFile('images.zip') as zf:
for file in zf.namelist():
if not file.endswith('.png'): # optional filtering by filetype
continue
with zf.open(file) as f:
image = pygame.image.load(f, namehint=file)
The plus side of using context managers (with statement) is that the files are automatically closed properly.