define 'in' operator on lists

Michael Hoffman at
Mon Oct 11 14:47:15 CEST 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