I am making progress learning Python. and English. I understands tuples, lists and dictionaries, but sets don't make muchly sense. Why use a set? What is a set good for?
bumsfeld
413
Nearly a Posting Virtuoso
Recommended Answers
Jump to PostHi!
Did you have a look at the python-docs?
This should make clear that sets are really useful :)Regards, mawe
Jump to PostThank you mawe,
so when I take the list with duplicates and make it one set then the duplicates are gone. How can I find out which were those duplicates?
you can use the list method somelist.count(x),
which returns the number of i's for which somelist == x :
All 5 Replies
mawe
6
Junior Poster
bumsfeld
413
Nearly a Posting Virtuoso
monkeyy
0
Newbie Poster
vegaseat
1,735
DaniWeb's Hypocrite
Team Colleague
bumsfeld
413
Nearly a Posting Virtuoso
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.