sizeFormats = ['1024x1024', '114x114', '40x40', '58x58', '60x60',
    '640x1136', '640x960']
sizeTuples = [(int(w), int(h)) for w, h in map(lambda wh: wh.split('x'),
    sizeFormats)]

def resizeImages():
    for image in os.listdir(targetPath):
        for resizedWidth, resizedHeight in sizeTuples:
            sourceFilePath = os.path.join(targetPath, image)
imageFileToConvert = Image.open(sourceFilePath)
outputFile = imageFileToConvert.resize((resizedWidth, resizedHeight), Image
    .ANTIALIAS)
outputFile.save(sourceFilePath)
Как дважды перебрать один элемент функции zip() — Python