I have a mixed nested list [[name1,score],[name2,score],...]
.
How do I remove the names with the lowest score? I selected an element with the lowest score and looped through the list and compared scores and remove if the score matches the min.
lmin=min(list, key = lambda x: x[1])
for l in list:
if( ls[1] == lmin1[1]):
ls1.remove(l)
But it doesn't remove all, only the first instance. Where am I making a mistake? Best,