Programming becomes interesting when you can work with sets of elements.
There are just a few examples where they appear:
- Paginated data output on the website
- Calculate the order total based on the price of each item
- Displaying a list of friends, messages, movies, and the like
- Processing a set of DOM nodes (HTML, frontend development)
Every list we encounter in a real or virtual world is, from a programmer's point of view, a collection of items. Python uses lists, a data structure that allows you to work with the set as a single entity:
// Defining a friends list