In this course, you learned about lists and how to use them. However, we described a predominantly imperative approach to working with lists. We modify lists on the fly by performing sequences of actions. We explained to the computer how to get the desired result.
This approach allows you to use lists efficiently, and you can use it to write programs that work quickly. But the imperative isn't the only approach.
There's also the declarative approach, which describes what you want to end up within the code. We've already touched on this a bit when we talked about generators. In later courses, you'll learn how to implement generators, and you'll learn about other tools for declarative collection programming.
It's also essential to understand the difference between iterated objects and iterators. Later, you'll learn about other collections. And these collections also implement the iteration protocol. So, you can use for
loops with them.
In addition to lists, we introduced you to concepts such as references and protocols.
Many syntactic constructs work on protocols. It will help you design your data types so that they're convenient and pleasant to work with, both for you and for other programmers. And knowing that we always pass objects by reference will help you debug object-oriented code and multithreaded applications.
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.