You are viewing a single comment's thread. Return to all comments →
Its pretty elegant even in a 6 line Python solution, you should have no problem reading this:
n = int(input())
c = set(input())
for i in range(n-1):
a = set(input())
c = c.intersection(a)
You don't need to convert each input into a set, since the intersection method takes any iterable as an argument.
TypeError: descriptor 'intersection' requires a 'set' object but received a 'str'