list comprehention

Matt matthew_shomphe at
Thu Jan 19 12:50:49 EST 2006

Tim Chase wrote:
> I'm a tad confused by the help, as it sounds like sets are
> supposed to be first-class citizens, but in ver2.3.5 that I'm
> running here (or rather "there", on a friend's box), I have to
> "import sets" which I didn't see mentioned in the reference manual.
> -one of many tims on the list
> tim = Set(["bald", "vegetarian", "loving husband"])
> :)

The builtin "set" was added in 2.4, I believe (note lowercase "s"):

print "vegetarian".replace("etari","")

More information about the Python-list mailing list