파이썬엔 remove_all() 같은 함수가 없으므로 다음과 같은 방법을 사용하자.
arr = [1, 2, 2, 2, 2, 3, 4, 4, 4, 4, 5] remove_set = {2, 4} arr_removed = [i for i in arr if i not in remove_set] # [1, 3, 5]