+ 2
list.remove delete first object in the list, but not all similar objects.
how delete all objects like 'p' in list ['p', 4, 'g', 'p', 'u', 'p']?
1 Answer
+ 1
Put the delete command into a while loop(or any other loop) that iterates until there is a 'p' in the list.