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
|
957 Discussions
|
Please Login in order to post a comment
n=int(input()) countries=set() for i in range(n): name=input() countries.add(name) print(len(countries))
n=int(input()) se=set() for i in range(n): se.add(input())
print(len(se))
country_size=int(input()) country_set=set() for _ in range(country_size): country_name=input() country_set.add(country_name) print(len(country_set))
country_size=int(input()) country_set=set() for _ in range(country_size): country_name=input() country_set.add(country_name) print(len(country_set))