def cxMessyOnePoint(ind1, ind2):
 cxpoint1 = random.randint(0, len(ind1))
 cxpoint2 = random.randint(0, len(ind2))
 (ind1[cxpoint1:], ind2[cxpoint2:]) = (ind2[cxpoint2:], ind1[cxpoint1:])
 return (ind1, ind2)

def cxMessyOnePoint ( ind1 , ind2 ) : cxpoint1 = random . randint ( 0 , len ( ind1 ) ) cxpoint2 = random . randint ( 0 , len ( ind2 ) ) ( ind1 [ cxpoint1 : ] , ind2 [ cxpoint2 : ] ) = ( ind2 [ cxpoint2 : ] , ind1 [ cxpoint1 : ] ) return ( ind1 , ind2 )
executes a one point crossover on :term:sequence individual .