Only this week, get the SQL Complete Track of 9 courses in a special prize of $330$89!
Introduction
Displaying values
Variables
The print function
List basics
20. Assigning new values
Summary

Instruction

Good. Using square brackets, we can also assign new values to specific elements.

# define a list
'Toronto', 'Montreal', 'Calgary', 'Ottawa',
'Edmonton', 'Mississauga', 'Winnipeg', 'Vancouver',
'Brampton', 'Familton']

# population changes...

We found out that Quebec now has more people than Familton, so we change the tenth element (remember, its index is 9) to 'Quebec'. Familton is out of the game!