How to wrapper built-in list in python?
How to wrapper built-in list in python? Question: I want to define a class ListWrapper that has all list behaviors and also has a filter method. It should work like this: ls = [1, 2, 3, 4, 5] ls = ListWrapper(ls) ls.filter(lambda x: True if x % 2 == 0 else False) print(ls) # out: …