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
|
896 Discussions
|
Please Login in order to post a comment
I’ll leave it as an example, maybe someone will be interested. Good luck to the rest
s=int(input()) a=set() for i in range(s): k=input() a.add(k) print(len(a))
Hi all,
One-liner, just in case :)
Hello,
Here's my code, I hope it helps!