"Steven D'Aprano" <[EMAIL PROTECTED]> wrote:
8<--------------------------

> Given a source list, find the offset of a target sub-list within the
> source list, in other words, find for lists.
>
> i.e. search(source, target) returns n if source[n:n+len(target)] == target
> for any sequence type.
>
> Yes, I know I'm changing the constraints of the problem. Now for a real
> challenge, change the search from a one-dimensional data structure to two.
>
> (The solution is left as an exercise for the class.)

do you mean like a cross word puzzle - find for fit both across and down, and
possibly reversed too, in both dimensions? - sounds like a lot of nested loops
to me...

- Hendrik



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

Reply via email to