I would like to understand why in this code :
For[k = 1, k <= Length[Couples1],
j3[k][[1]] = 6;
j3[k][[2]] = 7;
Print[j3[k][[1]]];
k++;
];
1
2
3
4
5
6
7
8
9
My variable j3[k][[1]] isn't affected to "6" ? It is just a code of example but I don't get why it does'nt work ?
j3[[k]][[1]]example while you havej3[k][[1]]but the issue is the same and should answer your problem. Let me know if you disagree. Also see the second link from comment and links from it to learn more if you want. – Kuba Jun 18 '17 at 21:17j3[k] = ReplacePart[j3[k], 1 -> 6]– Kuba Jun 23 '17 at 06:43