You are viewing a single comment's thread. Return to all comments →
Python one-liner
return len(set(a) & set([item + k for item in set(a)]))
Seems like cookies are disabled on this browser, please enable them to open this website
Pairs
You are viewing a single comment's thread. Return to all comments →
Python one-liner
return len(set(a) & set([item + k for item in set(a)]))