define 'in' operator on lists

..:: sjf ::.. somebody at unknown.org
Mon Oct 11 05:53:36 EDT 2004


Hi all,

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:

L = [1, 2, 3, 4, 5, 6, 7]
_list = [3, 4, 5]

if L2 in L0:
	return True
else:
	return False

How to do that?

-- 
.:: sjf ::..
"Linux is like Wigwam. No gates, no windows... Apache inside ;-)"



More information about the Python-list mailing list