5 questions0m 0s
Learn the skill
For this worksheet only, list positions start at 1. SET items TO [4, 7, 2] creates three ordered values. items[2] means the second value. SET items[2] TO 9 replaces that value, not the whole list. Programming languages can use different indexing rules.
Worked example
Initially items[1] is 4 and items[2] is 7. Replacing position 2 with 9 gives [4, 9, 2]. There are still three items.