You are viewing a single comment's thread. Return to all comments →
Very pretty and concise! I did the same thing, but a bit more verbose since I'm still getting used to python coming from c-esque syntax.
n = int(raw_input())
for i in range(n):
if i == 0:
gems = set(raw_input())
gems = gems.intersection(set(raw_input()))