Building a loop in python
In my file pool I have a bunch of images, all called
<name>.jpg. I want to use each image with its corresponding name in a loop (basically, this is for the familiarisation phase of an experiment).
Given a list called
filename and one called
name, made like this:
# get all images in the file pool (all .jpg format) filename = [image for image in pool if ".jpg" in image] # images are named after their content, so these are the image names name = [image.rsplit(".",1) for image in filename
is there a way I can populate a loop datamatrix so that it looks as below, and then use it?
Thanks in advance!