Logan,
I believe you need Python 2.4 which added the "set" function.
-Doug
Przemyslaw Kisicki wrote:
I use: -------------------------------------------------------------------------------- Python 2.3.4 (#2, Aug 19 2004, 15:49:40) [GCC 3.4.1 (Mandrakelinux (Alpha 3.4.1-3mdk)] on linux2 ... IDLE 1.0.3 -------------------------------------------------------------------------------- I was trying to write: --------------------------------------------------------------------------------
basket=['apple','orange','apple','pear','orange','banana'] fruits=set(basket)
-------------------------------------------------------------------------------- and I get: -------------------------------------------------------------------------------- Traceback (most recent call last): File "<pyshell#322>", line 1, in -toplevel- fruits=set(basket) NameError: name 'set' is not defined
-------------------------------------------------------------------------------- What's wrong? How to use sets?
Logan _______________________________________________ IDLE-dev mailing list [email protected] http://mail.python.org/mailman/listinfo/idle-dev
-- Douglas S. Blank, Assistant Professor [EMAIL PROTECTED], (610)526-6501 Bryn Mawr College, Computer Science Program 101 North Merion Ave, Park Science Bld. Bryn Mawr, PA 19010 dangermouse.brynmawr.edu _______________________________________________ IDLE-dev mailing list [email protected] http://mail.python.org/mailman/listinfo/idle-dev
