def comprise(list1,list2,**kwargs):
if('<STR_LIT>' in kwargs):<EOL><INDENT>mode = kwargs['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>mode = "<STR_LIT>"<EOL><DEDENT>len_1 = list1.__len__()<EOL>len_2 = list2.__len__()<EOL>if(len_2>len_1):<EOL><INDENT>return(False)<EOL><DEDENT>else:<EOL><INDENT>if(mode=="<STR_LIT:strict>"):<EOL><INDENT>if(list2 == list1[:len_2]):<EOL><INDENT>return(True)<EOL><DEDENT>else:<EOL><INDENT>return(False)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>end = len_1 - len_2<EOL>for i in range(<NUM_LIT:0>,end+<NUM_LIT:1>):<EOL><INDENT>if(list2 == list1[i:(i+len_2)]):<EOL><INDENT>return(True)<EOL><DEDENT>else:<EOL><INDENT>pass<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return(False)<EOL>
from elist.elist import *
comprise([1,2,3,4,5],[2,3,4],mode="loose")
comprise([1,2,3,4,5],[2,3,4])
comprise([1,2,3,4,5],[2,3,4],mode="strict")
comprise([1,2,3,4,5],[1,2,3,4],mode="strict")
#not recursive ,only one level
#please refer to ListTree.search for recursive support