Python 数据结构 - 集合和冻结集(2024)
Python Data Structures - Sets and Frozen Sets (2024)
- 01 - Introduction
- 01 - Why use sets and frozen sets
- 02 - What you should know
- 03 - How to use CoderPad
- 02 - 1. Introduction to Sets
- 01 - Introduction to sets
- 02 - Defining a set and common pitfalls while initializing a set
- 03 - Immutable and mutable
- 04 - Hashable and iterable
- 05 - Solution Remove multiple occurrence
- 03 - 2. Set Operations
- 01 - Set membership
- 02 - Iterating through a set
- 03 - Set comprehension
- 04 - Solution Student course registration
- 04 - 3. Operators and Methods
- 01 - Understand set theory with an example
- 02 - Find all the elements present in different sets
- 03 - Find the common elements present between the sets
- 04 - Determine the difference between two sets
- 05 - Determine the symmetric difference between two sets
- 06 - Determine whether two sets have any common elements
- 07 - Determine whether one set is a subset of another
- 08 - Determine whether one set is a superset of another
- 09 - Solution List unregistered students
- 05 - 4. Modifying a Set
- 01 - Add an element to a set
- 02 - Add multiple elements with the update() method
- 03 - Remove an element from a set
- 04 - Remove an element from a set using discard()
- 05 - Using pop() to remove and return an element from a set
- 06 - Clearing all elements from a set
- 07 - Solution Filter by the first character
- 06 - 5. Using Built-In Functions
- 01 - Using length to find the number of items in a set
- 02 - Find the largest element in the set
- 03 - Find the smallest element in the set
- 04 - Sort all the elements in the set
- 05 - Find the sum of all elements in a set
- 06 - Solution Most popular course
- 07 - 6. Frozen Sets
- 01 - Introduction to frozen sets
- 02 - Why frozen sets
- 03 - Creating frozen sets
- 04 - Solution Composite key search
- 08 - 7. Sets and Frozen Sets Internals
- 01 - What is a hash table
- 02 - Finding the Index in the hash table
- 03 - How do sets work under the hood
- 09 - 8. Pros and Cons
- 01 - Sets vs. other Python data structures
- 10 - 9. Application Ideas
- 01 - Solution Invoice value computation
- 11 - Conclusion
- 01 - Next steps