define 'in' operator on lists

Michael Hoffman m.h.3.9.1.without.dots.at.cam.ac.uk at example.com
Mon Oct 11 08:47:15 EDT 2004


Phil Frost wrote:
> [sjf]
>>I want to define 'in' operator (or any "magic" function) on list which 
>>returns True value if all of list (i.e. _list) elements appears in other 
>>list (i.e. L) in the same order and False otherwise. By way of example:
> You might find that the 'sets' module does what you need.

Those sets are not ordered.
-- 
Michael Hoffman



More information about the Python-list mailing list