def cxCounter(ind1, ind2, indpb):
 for key in ITEMS.keys():
  if (random.random() < indpb):
   (ind1[key], ind2[key]) = (ind2[key], ind1[key])
 return (ind1, ind2)

def cxCounter ( ind1 , ind2 , indpb ) : for key in ITEMS . keys ( ) : if ( random . random ( ) < indpb ) : ( ind1 [ key ] , ind2 [ key ] ) = ( ind2 [ key ] , ind1 [ key ] ) return ( ind1 , ind2 )
swaps the number of perticular items between two individuals .