Dec. 21, 2021
5:12 p.m.
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)