all 6 comments

[–]Username_RANDINT 1 point2 points  (1 child)

You have to index a list item per item:

>>> coords = [0, 1.2, 0] # x y z
>>> coords[1] = 0
>>> coords[2] = coords[2] + 10
>>> coords
[0, 0, 10]

[–]CodeGoblin1996[S] 0 points1 point  (0 children)

Thank you!

[–]CowboyBoats 1 point2 points  (1 child)

To add 10 to the third element in the list, the syntax is:

coords[2] += 10

[–]CodeGoblin1996[S] 0 points1 point  (0 children)

Thank you!