How do I change the value of tiger?


#1

Question

How do I change the value of tiger?

Answer

The first step is to note what index ”tiger” is currently at, and remember that indexes start from 0.
Then we use our list name, brackets, and that index number, followed by an equal sign and the new value you want to be stored in that index.
list_name[index_of_tiger] = “new value!”


FAQ: Learn Python: Python Lists and Dictionaries - New Neighbors