Skip to main content

2 docs tagged with "Sets"

View all tags

Common Collection Methods and Best Practices

Over the last several articles, we've explored Python's powerful built-in collection types: lists, tuples, dictionaries, and sets, as well as the specialized containers in the collections module. This article serves as a capstone, summarizing the best practices and helping you decide which collection to use in different scenarios.

Sets: Unordered collections of unique items. Set operations.

We've explored ordered collections like lists and **tuples**, and the key-value world of dictionaries. Now we introduce the final core collection type: the set. Sets are all about uniqueness and are modeled after the mathematical concept of a set.