Most efficient solution?

Terry Reedy tjreedy at home.com
Mon Jul 16 13:06:12 EDT 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
non-null strings.

Terry J. Reedy






More information about the Python-list mailing list