def join_rows(rows, joiner=' '):
 rows = list(rows)
 fixed_row = rows[0][:]
 for row in rows[1:]:
  if (len(row) == 0):
   row = ['']
  fixed_row[(-1)] += ('%s%s' % (joiner, row[0]))
  fixed_row.extend(row[1:])
 return fixed_row

def join_rows ( rows , joiner = ' ' ) : rows = list ( rows ) fixed_row = rows [ 0 ] [ : ] for row in rows [ 1 : ] : if ( len ( row ) == 0 ) : row = [ '' ] fixed_row [ ( - 1 ) ] += ( '%s%s' % ( joiner , row [ 0 ] ) ) fixed_row . extend ( row [ 1 : ] ) return fixed_row
given a series of rows .