I need to get coordenadas cartesianas
and separate them, so that you know which pair is ordered. I get a string
where the points come this way: x0,y0 x1,y1 ... xn,yn
I used a% w / o for space first and then an array for commas, the problem is that the way I did it is only storing array split
. I need to use valor do primeiro par ordenado
to traverse the entire array so that it does not matter how many points are entered
Code:
pontos=vetor.split(' ')
while(cont<(2*len(pontos))):
cord.append(0)
cont=cont+1
cont=0
while(i<len(pontos)):
p=(pontos[i].split(',')
while(len(p)>cont):
cord[cont]=p[cont]
cord[cont+1]=p[cont+1]
cord=cord+1
i=i+1
p=[]