Register to get access to free programming courses with interactive exercises

Conclusion Python: Lists

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.

Get access
130
courses
1000
exercises
2000+
hours of theory
3200
tests

Sign up

Programming courses for beginners and experienced developers. Start training for free

  • 130 courses, 2000+ hours of theory
  • 1000 practical tasks in a browser
  • 360 000 students
By sending this form, you agree to our Personal Policy and Service Conditions

Our graduates work in companies:

Bookmate
Health Samurai
Dualboot
ABBYY
Suggested learning programs
profession
new
Developing web applications with Django
10 months
from scratch
under development
Start at any time

Use Hexlet to the fullest extent!

  • Ask questions about the lesson
  • Test your knowledge in quizzes
  • Practice in your browser
  • Track your progress

Sign up or sign in

By sending this form, you agree to our Personal Policy and Service Conditions
Toto Image

Ask questions if you want to discuss a theory or an exercise. Hexlet Support Team and experienced community members can help find answers and solve a problem.