def cxOnePoint(ind1, ind2):
 size = min(len(ind1), len(ind2))
 cxpoint = random.randint(1, (size - 1))
 (ind1[cxpoint:], ind2[cxpoint:]) = (ind2[cxpoint:], ind1[cxpoint:])
 return (ind1, ind2)

def cxOnePoint ( ind1 , ind2 ) : size = min ( len ( ind1 ) , len ( ind2 ) ) cxpoint = random . randint ( 1 , ( size - 1 ) ) ( ind1 [ cxpoint : ] , ind2 [ cxpoint : ] ) = ( ind2 [ cxpoint : ] , ind1 [ cxpoint : ] ) return ( ind1 , ind2 )
executes a one point crossover on the input :term:sequence individuals .