You are viewing a single comment's thread. Return to all comments →
def get_distinct_country_stamp(N, countries): country_set = set() for country in countries: country_set.add(country) return len(country_set) N = int(input().strip()) countries = [input().strip() for i in range(N)] count = get_distinct_country_stamp(N, countries) print(f"{count}")
Seems like cookies are disabled on this browser, please enable them to open this website
Set .add()
You are viewing a single comment's thread. Return to all comments →