We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Sets
- Set .add()
- Discussions
Set .add()
Set .add()
Sort by
recency
|
976 Discussions
|
Please Login in order to post a comment
N=int(input()) country_stamps=set() for i in range(N): country_stamps.add(input()) print(len(country_stamps())
N = int(input())
country_stamp = set(input() for _ in range(N))
print(len(country_stamp))
N=int(input()) country_stamp=[input() for _ in range(N)] print(len(set(country_stamp)))
n= int(input()) print(len(list(set([input() for _ in range(n)]))))
Simple two lines Code