basic question, sorry

Sami Hangaslammi sami.hangaslammi.spam.trap at yomimedia.fi
Mon Aug 21 01:53:40 EDT 2000


<s_gherman at yahoo.com> wrote in message news:8nqfao$c1l$1 at nnrp1.deja.com...
> How can I check that dict[n] exists or not already?
>
> I tried:
> 1) if not dict[n]
> 2) if dict[n] == None

if not dict.has_key(n)





More information about the Python-list mailing list