Note that this initializes every element to the same empty array. If you want to initialize them to distinct empty arrays you should use a comprehension. See Initialize array of arrays - #2 by GunnarFarneback
1 Like