我无法删除第二个最小子列表
m=min(l) #l is the list
print(l)
for i in l:
if i[0]==m[0]:
l.remove(i)
print(l)
输出:
[[19.0, 'Kakunami'], [19.0, 'Varun'], [20.0, 'Beria'], [20.0, 'Harsh'], [21.0, 'Vikas']]
[[19.0, 'Varun'], [20.0, 'Beria'], [20.0, 'Harsh'], [21.0, 'Vikas']]