Most efficient solution?

Terry Reedy tjreedy at home.com
Mon Jul 16 13:20:04 EDT 2001


> map(A.remove, bb)

Removing items from a list one at a time is O(len(list)) for each item
removal.
Filter() seems the better way to remove several items since it scans the
list only once instead of len(bb) times.





More information about the Python-list mailing list