Advertisement
Guest User

Untitled

a guest
Oct 7th, 2015
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. list2=[[((2, 2), (5, 5)), (4.0, 4.0)], [((4, 2), (4, 8)), (4.0, 4.0)], [((5, 6), (3, 8)), (4.0, 7.0)], [((4, 2), (4, 8)), (4.0, 7.0)], [((5, 6), (3, 8)), (4.0, 7.0)], [((1, 4), (5, 8)), (4.0, 7.0)], [((4, 2), (4, 8)), (4.0, 7.0)], [((1, 4), (5, 8)), (4.0, 7.0)]]
  2.  
  3. [((4, 2), (4, 8)), (4.0, 7.0)] ,[((4, 2), (4, 8)), (4.0, 4.0)]
  4.  
  5. list3=list2
  6. i=range(0,len(list2))
  7. j=range(0,len(list2))
  8. for i in list2:
  9. for j in list3:
  10. if list2[i][0]==list3[j][0] and list2[i][1]!=list3[j][1]:
  11. list2[i].append(list3[j][1])
  12. list2.pop(j)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement