Python course #6. Lists, tuples and dictionaries – .com

In this sixth class of the basic Python course we are going to learn the different data structures in lists, tuples and dictionaries.

We are going to see the different types of lists of values ​​that we can find in Python. Specifically, we are going to see lists, tuples and dictionaries.

Lists are arrays. If you already know other programming languages, you will understand what an array is. Otherwise don’t worry, an array or list is basically a container where you store a series of values. Let’s see it!

That easy! We already know how list data types work and how we can create data mappings with dictionaries. We can define a list of variables or values ​​of different types: text strings, numbers, objects, even other arrays.

It must be taken into account that in programming, a list of elements always starts from position 0 and not from position 1. Knowing this, we can start manipulating the lists by accessing the different positions to modify or use the specific content that is stored.

In the case of tuples, we can say that they are practically the same as lists, except that in this case the data cannot be modified, that is, tuples are “closed” lists.

Finally highlight the importance of dictionaries. These lists are more powerful and it is that they allow us to map the information to generate objects. They are made up by key/value unlike normal lists which go by position. In this way, with a dictionary we can access through the key to access the content.

See also  OBS course #10. StreamLabs OBS and OBS Live - .com

As homework I encourage you to investigate more about Python’s own functions in lists, tuples and dictionaries. For this you will have to go to the official Python documentation where you can find a large number of defined functions with examples to practice with. So you can put into practice everything you have learned so far.

As always, if you have any doubt or question, you can send it through the support form of the subscriber intranet. See you in the next lesson! 🙂

Remember that if you will have access to everybody the courses and you can also enjoy everything from .

All chapters in this course:

Loading Facebook Comments ...
Loading Disqus Comments ...