python list remove all 在 Remove all occurrences of a value from a list? - Stack Overflow 的評價 Functional approach: Python 3.x >>> x = [1,2,3,2,2,2,3,4] >>> list(filter((2).__ne__, x)) [1, 3, 3, 4]. ... <看更多>