Suppose I have two lists, L and M. Now I want to know if they share an element. Which would be the fastest way of asking (in python) if they share an element? I don't care which elements they share, or how many, just if they share or not.
For example, in this case
L = [1,2,3,4,5,6]
M = [8,9,10]
I should get False, and here:
L = [1,2,3,4,5,6]
M = [5,6,7]
I should get True.
I hope the question's clear. Thanks!
Manuel