My original thought process was that I could reference an item in a list easier by saving it in a variable.
Let's say I've created a list:
list = [0, 0 ,0 ,0, 0]
Can I store each item in a variable?
list1 = list[0]
list2 = list[1]
list3 = list[2]
list4 = list[3]
Then change that item using the variable:
list1 =+ 1
But here the original list remains the same:
print(list)
[0, 0, 0, 0, 0]
So it would appear the variable takes the value from the list, and I'm only changing the variable not the original list.
print(list1)
1
Is there a way to store list items in variables but have it so I'm actually performing operations on the items in the list, not 'copies' of the item?