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
|
921 Discussions
|
Please Login in order to post a comment
N=int(input()) country_name={} country_name=set(country_name) for i in range(N): j=input() # print(j) country_name.add(j)
print(country_name)
print(len(country_name))
N= int(input())
stamp_set=set()
for i in range(N): stamp_set.add(input())
print(len(stamp_set))
N = int(input()) country_set = {} country_set = set(country_set)
for j in range(N): country = input() country_set.add(country)
print(len(country_set))