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
|
971 Discussions
|
Please Login in order to post a comment
x=int(input()) y=set() for n in range(x): y.add(input())
print(len(y))
code
a=int(input()) #total number of country stamps b=set() #input taking as set because it removes duplicate values for i in range(a): c=input() #taking country names as inputs. b.add(c) #appending country names to set print(len(b)) #obtaning length of set.**
Brolly Academy in Hyderabad offers a comprehensive Data Science course covering Python programming, statistics, machine learning, deep learning, NLP, and data visualization. The course includes hands-on projects, expert-led training, flexible learning modes (online, offline, self-paced), and placement assistance. Students receive lifetime access to learning materials and an industry-recognized certification upon completion. It is designed for both beginners and professionals looking to enhance their data science skills. For more details, visit Brolly Academy's website.https://brollyacademy.com/data-science-course-in-hyderabad/