Steven Taschuk staschuk at
Fri Jun 6 19:06:17 CEST 2003

Quoth Fredrik Lundh:
> "delphiro" <delphiro at> wrote:
> > is this the easiest way to check for the existance of an item in a list?
> the usual way to do this is:
>     if self.pointmarker in self.selected_points:
> you can also use "find", which does the same thing as "index" if
> successful, but returns -1 if the item is not found.

Lists don't have a .find.  (Strings do.)

Steven Taschuk                            staschuk at
Every public frenzy produces legislation purporting to address it.
                                                  (Kinsley's Law)

More information about the Python-list mailing list