A list is a type of value used in Python.
A list is used to represent many items of the same type of value together.
The List type is referred to as list
internally in Python.
Lists are unique because they can store as many values as you want in them, and then retrieve the value from an index (position in list) later.
Tip: Python uses 0
as the first index in a list or Tuple.
Here is an example of a list:
You can append values to a list like this:
You can also iterate through a list, here's an example of iterating through a list and then using f-strings to print the value and the index: