05-14-2023, 07:54 AM
Code:
listOfPointsTupple=[]
while len(listOfPoints)>1:
listOfPointsTupple.append((listOfPoints.pop(0),listOfPoints.pop(0)))
Much more pythonic (and likeky faster):
Code:
listOfPointsTupple=zip((listOfPoints[0::2],listOfPoints[1::2])