You've learned how to work with individual pieces of data using variables and fundamental types like numbers, strings, and booleans. However, most programs need to handle groups of related data. Storing each item in a separate variable quickly becomes impractical.
This chapter introduces Python's built-in collection types, which provide efficient ways to store and manage multiple data items. You will learn about:
Understanding how to use these different structures effectively is essential for organizing data in your Python programs. We will cover how to create, access, modify (where applicable), and choose the appropriate collection type for different programming scenarios.
4.1 Introduction to Sequences: Lists
4.2 Modifying Lists: Adding, Removing, Changing Items
4.3 Immutable Sequences: Tuples
4.4 Key Value Pairs: Dictionaries
4.5 Accessing and Modifying Dictionary Data
4.6 Unique Items: Sets
4.7 Operations on Sets
4.8 Choosing the Right Data Structure
4.9 Hands-on Practical: Working with Collections
© 2025 ApX Machine Learning