I have a polygonal geometry and I select pairs of edges manually.
Then I run the code:
import pymel.core as pm edges = pm.ls(sl = 1) print edges
For one pair of selected edges I get:
How can I get the first list in the same way as a second (each edge should be a separate object   instead of [373:374])?
Why I need this. I need to polyDuplicateEdge() for each pair of manually selected edges and it does not work if pair of edges has consecutive numbers:
listEdges = pm.ls(sl = 1) listDone =  for edge in listEdges: if not edge in listDone: connected = edge.connectedEdges() for i in connected: if i in listEdges: listDone.append(i) listDone.append(edge) pm.polyDuplicateEdge([edge, i], of=0.1)