Most efficient solution?
tjreedy at home.com
Mon Jul 16 19:06:12 CEST 2001
"Alex" <new_name at mit.edu> wrote in message
news:etdbsmkrhqa.fsf at quiche-lorraine.mit.edu...
> > I'm pretty sure this will work, though I've not tested. C.get(item)
> > will return None (thus false) if item was not in B, and 1 (thus true)
> > if item was in B. You should definitely give a try to this version.
> Yes, but what if item == None, or item == ''?
In general, this is a valid objection. In this context, all items are
Terry J. Reedy
More information about the Python-list