def display(board):
    "Draw an ascii board showing positions of queens"
    assert len(board)==MAX
    it = iter(board)
    for row in xrange(NUM_QUEENS):
        for col in xrange(NUM_QUEENS):
            print it.next(),
        print '\n'
Draw an ascii board showing positions of queens
recipes/Python/473832_Eight_Queens_using_Generator/recipe-473832.py