Hi,
I came across this issue when trying to figure out the closest set of multiples for a given length of items in a list. The code below works but I wanted to see if anyone else had a better solution than the one below.
n = 12
ranges = [chr(i) for i in range(65, 65+n)]
print (ranges)
v = [i+1 for i in range(len(ranges))]
print (v)
testlist = [[x,y] for x in v for y in v if all([len(v) in [x*y, y*x], x%y > y%x])][-1]
print (testlist)