SyntaxFix
Write A Post
Hire A Developer
Questions
Repeating the solution of the first post in a more abstract way:
>>> x = [1, 2, 3, 4, 2, 2, 3] >>> while 2 in x: x.remove(2) >>> x [1, 3, 4, 3]