In this HackerRank Set .add() problem solution Apply your knowledge of the .add() operation to help your friend Rupal. Rupal has a huge collection of country stamps. She decided to count the total number of distinct country stamps in her collection. She asked for your help. You pick the stamps one by one from a stack of N country stamps. Find the total number of distinct country stamps.

HackerRank Set .add() in python problem solution

HackerRank Set .add() in python problem solution

# Enter your code here. Read input from STDIN. Print output to STDOUT
length = int(raw_input())
data = set()

for i in range(0, length):
    data.add(raw_input())
    
print len(data)