def display_board(genome):
 print((('+-' + ('--' * len(genome))) + '+'))
 for row in range(len(genome)):
  elements = []
  for genome_item in genome:
   if (genome_item == row):
    elements.append('Q')
   else:
    elements.append('.')
  print((('|' + ''.join(elements)) + '|'))
 print((('+-' + ('--' * len(genome))) + '+'))

def display_board ( genome ) : print ( ( ( '+-' + ( '--' * len ( genome ) ) ) + '+' ) ) for row in range ( len ( genome ) ) : elements = [ ] for genome_item in genome : if ( genome_item == row ) : elements . append ( 'Q' ) else : elements . append ( '.' ) print ( ( ( '|' + '' . join ( elements ) ) + '|' ) ) print ( ( ( '+-' + ( '--' * len ( genome ) ) ) + '+' ) )
display a genome in the n-queens problem .