Way for see if dict has a key
Chance Ginger
cginboston at hotmail.com
Fri Jun 30 06:51:35 EDT 2006
More information about the Python-list mailing list
Fri Jun 30 06:51:35 EDT 2006
- Previous message (by thread): Way for see if dict has a key
- Next message (by thread): Way for see if dict has a key
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, 30 Jun 2006 10:19:46 +0000, Michele Petrazzo wrote: > Hi ng, > what the preferred way for see if the dict has a key? > We have a lot of solutions: > > key in dict > key in dict.keys() > dict.has_key(key) > ... > > but what the better or the more "pythonic"? > > Thanks, > Michele It is a religious call....
- Previous message (by thread): Way for see if dict has a key
- Next message (by thread): Way for see if dict has a key
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list