Lists
Explore how to work with Python lists by learning their structure, indexing methods including negative indexes, and how to change elements or find list length. This lesson builds foundational skills for handling sequences in Python programming.
We'll cover the following...
We'll cover the following...
Definition
A list is a sequence of values enclosed in square brackets. It is extremely versatile as you can store multiple items of different data types inside of it. A list can also be treated as if it were an array.
Indexing
Lists are also zero-indexed, meaning the first item in the list is assigned an index of 0.
Therefore, if for example, a list called my_list ...