Test if list contains another list

mathieu mathieu.malaterre at gmail.com
Mon Sep 8 11:12:54 CEST 2008


Hi there,

  I am trying to write something very simple to test if a list
contains another one:

a = [1,2,3]

b = [3,2,1,4]

but 'a in b' returns False. How do I check that a is indeed contained
in b ?

thanks



More information about the Python-list mailing list