yeon
yeon I am a Korean web programmer with bboy dancing as a hobby. :)

set.add()

set.add()

hacker rank


Python Practice


set.add()


Input Format


The first line contains an integer N, the total number of country stamps.
The next N lines contains the name of the country where the stamp is from.


Output Format


Output the total number of distinct country stamps on a single line.


Sample Input

1
2
3
4
5
6
7
8
7
UK
China
USA
France
New Zealand
UK
France 


Sample Output

1
5



My code


1
2
3
if __name__ == '__main__':
    n = int(raw_input())
    print(len(set([str(raw_input()) for _ in range(n)])))



Hacker Rank > Python > set > set.add()

comments powered by Disqus