Fredrik Lundh wrote: > Michele Petrazzo wrote: > >> what the preferred way for see if the dict has a key? >> We have a lot of solutions: >> >> key in dict > > new syntax (2.3 and later). > So, following it, it can be used for the operations like len? len(dict) -> len(dict.keys()) ? Thanks, Michele