Created
August 7, 2013 18:18
-
-
Save robrocker7/6176875 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for coord in a: | |
xy1, xy2 = coord | |
if xy1 == spot[0] or xy1 == spot[1] or xy2 == spot[0] or xy2 == spot[1]: | |
a.pop(a.index(coord) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
import random
a = [((1,2),(3,4)) , ((6,7),(8,9)) , ((11,12),(13,14)) , ((1,2),(6,7))]
print a
spot = random.choice(a)
a.pop(a.index(spot))
print spot[0]
print spot[1]
for coord in a:
xy1, xy2 = coord
if xy1 == spot[0] or xy1 == spot[1] or xy2 == spot[0] or xy2 == spot[1]:
a.pop(a.index(coord))
#for value in coord:
# if value == spot[0] or value == spot[1]:
# a.pop(a.index(coord))
print a