Most efficient solution?

Terry Reedy tjreedy at
Mon Jul 16 19:20:04 CEST 2001

> map(A.remove, bb)

Removing items from a list one at a time is O(len(list)) for each item
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