The focus of this lesson is not the most basic, but it is the most important in the entire course.
Python is often used to work with data all over the world. There may be a small amount of data that even a weak computer can handle. Or there may be so much data that you need entire computer clusters, groups of computers networked together to solve a common problem. We can handle that amount of information only with that amount of power.
There is even a whole data science industry, and Python is one of the main tools in machine learning, expert systems, and data mining, among other things. We should represent all data in computer memory in a way that makes it convenient and efficient to work with. Programs often store data in collections — a list of users, a list of pages, a list of dates, a list of strings, and a list of servers. We can represent all of these entities in code as collections.
Python is known for providing a set of ready-made collection views that are efficient and easy to use. There are the basic built-in collection types in Python:
- Lists
- Dictionaries
- Sets
Different collections require different approaches and are handy in different situations. There are several very different approaches to working with lists alone! Python developers need to understand which collection to use, how to work with it, and the advantages and disadvantages of that choice.
It is also essential to understand that working with collections is an algorithm, not a skill that pops into your head.
We should comprehend how the program works and what resources the computer uses to run it. That is why we have several courses dedicated to collections as part of our specialization. Also, we mention the topic in courses not directly related to the topic. It is how we can hone the collecting skills — you spend time and effort to make the necessary connections in your brain.
Are there any more questions? Ask them in the Discussion section.
The Hexlet support team or other students will answer you.
For full access to the course you need a professional subscription.
A professional subscription will give you full access to all Hexlet courses, projects and lifetime access to the theory of lessons learned. You can cancel your subscription at any time.