Which module is "set " in?
Anthony Liu
antonyliu2002 at yahoo.com
Sat Feb 26 00:01:22 EST 2005
Thanks a lot, mine is Python 2.3, and
from sets import Set as set
works great!
--- Steven Bethard <steven.bethard at gmail.com> wrote:
> Anthony Liu wrote:
> > I want to use the set function like
> >
> > mylist = ['a', 'b', 'b', 'd', 'e', 'a']
> > myset = set (mylist)
> >
> > But I don't know what to import, I tried sys,
> sets,
> > they don't work.
>
> If you're using Python 2.4, they're builtin. If
> you're using Python
> 2.3, you'll probably want to do something like:
> from sets import Set as set
> Python's before 2.3 do not have a set type.
>
> > What's the easy way to find out the module that
> > contains a particular function?
>
> Perhaps the documentation index?
>
> http://docs.python.org/lib/genindex.html
>
> Steve
> --
> http://mail.python.org/mailman/listinfo/python-list
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250
More information about the Python-list
mailing list