def test_third_space(b, letter): print "\nPossible rows of three: " rows = board.all_two_rows(b, letter) for r in rows: third = board.third_space(r[0][0], r[0][1], r[1][0], r[1][1]) if third != None: row = [r[0], r[1], third] row.sort() print row
def test_all_two_rows(b): row = board.all_two_rows(b, "X") print row