I have recently started working with Python. I know it might be a silly question as it sounds very basic question to me.
I need to compare first list with second list and if first list values are there in the second list, then I want to return true.
children1 = ['test1']
children2 = ['test2', 'test5', 'test1']
if check_list(children1):
print "hello world"
def check_list(children):
# some code here and return true if it gets matched.
# compare children here with children2, if children value is there in children2
# then return true otherwise false
In my above example, I want to see if children1 list value is there in children2 list, then return true.