What works in Python doesn't want to work in Swift.
Given is an array with subarrays containing numbers. During iteration, as soon as the condition exists that the element in question contains a certain value at position 0, I want to change the other values in this same subarray.
var coordinatesList = [[0, 1, 1, 1], [1, 12, 17, 23], [2, 81, 29, 66], [3, 41, 20, 94]]
for i in coordinatesList {
if i[0] == 6 {
i[3] = 5
}
}
However, my intention fails, because I get the error message that the element i is a let.
An error message with which I can do nothing at all and do not know how to deal with it.