Answers for "remove all occurences"

0

remove all occurences

>>> x = [1, 2, 3, 4, 2, 2, 3]
>>> while 2 in x: x.remove(2)
>>> x
[1, 3, 4, 3]
Posted by: Guest on September-16-2021

Code answers related to "remove all occurences"

Python Answers by Framework

Browse Popular Code Answers by Language