-1

this code is being developed with Python. Let's say I have 3 folders and each folder contains 3 images. Expressed as lists.

folder1 = [1_img1, 1_img2, 1_img3]
folder2 = [2_img1, 2_img2, 2_img3]
folder3 = [3_img1, 3_img2, 3_img3]

I want to find all possible combinations of choosing 1 image from each of the 3 folders. The desired output is a list of tuples that represent image combinations. I am allowed to choose only 1 image from each folder and the tuple of image combinations will always be ordered by folder number with 1 being first, 2 being second, and 3 being last. For example:

[(1_img1, 2_img1, 3_img3), (1_img2, 2_img1, 3_img2), (1_img1, 2_img3, 3_img1), ... ]

What is the method or solution to this problem? I am finding trouble breaking down the problem into steps, and coming out with the desired result. Has anyone done this kind of problem before? Your help is much appreciated, thank you.

0 Answers0