def selWorst(individuals, k):
 return sorted(individuals, key=attrgetter('fitness'))[:k]

def selWorst ( individuals , k ) : return sorted ( individuals , key = attrgetter ( 'fitness' ) ) [ : k ]
select the *k* worst individuals among the input *individuals* .