Good evening everyone I used python 3.7.3 IDLE i found the bug to solve the 
problem when list contain repetitive value is come i.e. if i want to delete 2 
from list using remove function it's 2 value put containouls 2 and such value 
is remove using any type of loop all element are not delete from list. Any 
higher version cover such type of problem? or any other method for delete such 
value    
list1=[1,2,3,2,4,2,7,2,2,2,2,5,5,5,2,4,5,6,7,8]
a=0
while a < len(list1):
    if list1[a]==2:
        list1.remove(2)
    a=a+1
print(list1)
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/QJHHX2YAP2TQHS7O545B5GUVPVBJC6ZI/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to