0
I have the following situation:
I have 4 numerical lists ranging from 1 to 30. Ex.:
AP_X = [1,2,3,4,5...30]
AP_Y = [1,2,3,4,5...30]
demanda_X = [1,2,3,4,5...30]
demanda_Y = [1,2,3,4,5...30]
I have another list, empty, called
distancia
that will receive the result of these interactions.distancia = []
The lists
AP_X
andAP_Y
represent the coordinates of a point and the listsdemandas_X
anddemanda_Y
, represent the coordinates of another point.I need to make every point
AP(x,y)
match with each pointdemanda(x,y)
.For example:
distancia = [1,1,1,1 | 1,1,2,2 | 1,1,3,3 |...| 2,2,1,1 | 2,2,2,2| ...| 30,30,1,1 | 30,30,2,2 ]
I don’t know if I made myself clear, but I need to match every item AP(x,y)
with all demanda(x,y)
.
Thanks in advance for your help.
In fact I couldn’t understand what kind of combination you need. Can you explain better?
– Woss
For example: Say I have a list with [ a,b,c] and another list with [e,f,g]. I need the result to be [ae,af,ag,be,bf,bg,ce,cf,cg].
– Danilo
However, in my example the abcdefg = xy coordinates,
– Danilo
Excuse me if I’m not clear. I’m trying hard.
– Danilo