def mutFlipBit(individual, indpb):
 for i in xrange(len(individual)):
  if (random.random() < indpb):
   individual[i] = type(individual[i])((not individual[i]))
 return (individual,)

def mutFlipBit ( individual , indpb ) : for i in xrange ( len ( individual ) ) : if ( random . random ( ) < indpb ) : individual [ i ] = type ( individual [ i ] ) ( ( not individual [ i ] ) ) return ( individual , )
flip the value of the attributes of the input individual and return the mutant .