To delete the minimum values of a list, if I use the below code
l1=[10,10,89,34,10,34,10]
for x in s1:
if x == 10:
s1.remove(x)
The output is
[89, 34, 34, 10]
Why is that 10 not getting deleted? And do I go about this?
To delete the minimum values of a list, if I use the below code
l1=[10,10,89,34,10,34,10]
for x in s1:
if x == 10:
s1.remove(x)
The output is
[89, 34, 34, 10]
Why is that 10 not getting deleted? And do I go about this?