Skip to content

Instantly share code, notes, and snippets.

@kamatari
Created December 11, 2014 01:40
Show Gist options
  • Save kamatari/b0bb11b80db5a6e7b4eb to your computer and use it in GitHub Desktop.
Save kamatari/b0bb11b80db5a6e7b4eb to your computer and use it in GitHub Desktop.
test_list = [(1,1),(1,2),(1,3),(1,4),(1,5)]
for coordinate in test_list:
for c_point in test_list:
print 'compare_point ' + str(c_point)
test_list.remove(c_point)
print test_list
# output
'''
compare_point (1, 1)
[(1, 2), (1, 3), (1, 4), (1, 5)]
compare_point (1, 3)
[(1, 2), (1, 4), (1, 5)]
compare_point (1, 5)
[(1, 2), (1, 4)]
compare_point (1, 2)
[(1, 4)]
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment