On Tue, 16 Aug 2011 01:26:54 +0200, Johannes wrote:

> what is the best way to check if a given list (lets call it l1) is
> totally contained in a second list (l2)?

"Best" is subjective. AFAIK, the theoretically-optimal algorithm is
Boyer-Moore. But that would require a fair amount of code, and Python
isn't a particularly fast language, so you're likely to get better results
if you can delegate most of the leg-work to a native library (along the
lines of Roy's suggestion of using regexps).

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to