I have a few lists called find. I want to know if these find are part of full_list. Lists find 1-4 are part of full_list while lists find 5-7 are not.
The example below returns "Yes".
find1 = [[1, 1]]
find2 = [[1, 1], [2, 2]]
find3 = [[1, 1], [3, 3]]
find4 = [[4, 4], [2, 2], [3, 3]]
find5 = [[1, 0]]
find6 = [[1, 1], [2, 0]]
find7 = [[1, 1], [3, 0]]
full_list = [[1, 1], [2, 2], [3, 3], [4, 4]]
if find2[0] in full_list and find2[1] in full_list:
print("Yes")
else:
print("No")
Because len(find2) != len(find4), the current if statement is very clumsy and almost useless.
How to make this work in a more universal way?