You are viewing a single comment's thread. Return to all comments →
Pretty straight forward to get it down to 2 lines. The power of sets.
for _ in range(int(raw_input())): print "YES" if len(set(raw_input()) & set(raw_input())) > 0 else "NO"
Seems like cookies are disabled on this browser, please enable them to open this website
Two Strings
You are viewing a single comment's thread. Return to all comments →
Pretty straight forward to get it down to 2 lines. The power of sets.