> lot for the advice I got my concepts of def of functions , sort
> functions , count , cleared for me
>                I was able to do and understand all the
>  function example , except �item_comparison� function
>            I get the error  for set
>  >>> set((1,1,1,2,2,2,2,2,3,4,4,5))
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> NameError: name 'set' is not defined

Hi John,

For Python 2.3.4, you'll need to add the line:

######
from sets import Set as set
######

before trying to use 'set'.  Sets weren't so built into Python until
Python 2.4, and so examples that use 'set()' will need that above line to
install the proper support.

Best of wishes!

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to