Lesson 6
Dealing with Sequences of Objects
Chapter 3: More on lists
Updating values in a list
You can modify the value of an element in a list using indices.
>>> letters = ["a", "b", "c", "d"]
>>> letters[1] = "B"
>>> print(letters)
['a', 'B', 'c', 'd']
We will jump straight into a quiz! This is probably a better way to remember the nuances of changing the values of elements in lists! Please do not skip this quiz! There is very important information in there!
❮
❯