Set .add()

  • + 0 comments
    def distinct_stamps(N,names):
        return len(set(names))
        
    if __name__ == "__main__":
        N = int(input())
        names= []
        for _ in range(0,N):
            names.append(str(input()))
        result = distinct_stamps(N,names)
        print(result)