You are viewing a single comment's thread. Return to all comments →
Can't you simply just use set intersection?
Python
def two_strings(s1, s2): return 'YES' if set(list(s1)) & set(list(s2)) != set() 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 →
Can't you simply just use set intersection?
Python