1## checking any elment of list_B in list_A
2list_A = [1, 2, 3, 4]
3
4list_B = [2, 3, 6]
5
6check = any(item in list_A for item in list_B)
7
8print(check)
9# True
1## checking all elements of list_B in list_A
2list_A = [1, 2, 3, 4]
3list_B = [2, 3]
4
5check = all(item in list_A for item in list_B)
6
7print(check)
8# True