Making different things equal
wweston at att.net
Mon Aug 23 05:53:15 CEST 2004
M. Clift wrote:
> Hi Wes,
> Thanks for looking at this! I appreciate your effort.
> The system works very well, but I want it to see Bob as being the same thing
> as Mary. So for example it won't give [Bob, whoever, Mary] as that would be
> the same as [Mary, whoever, Mary] or [Bob, whoever, Bob].
>>> list = ['Bob', 'whoever', 'Mary']
>>> synonyms = ['Bob', 'Mary']
>>> if synonyms in list and synonyms in list:
... print "synonyms"
More information about the Python-list