I need to create a list containing a predefined number of zeros.
I know that I can create an empty one with let foo = []
but I would need to initialize it with a number of zeros contained in a variable.
:h List
doesn't seem to mention this use case, what's the most efficient way to do that?
A second part of my question is about nested lists:
I need to create a list of lists, with the number of inner lists contained in a variable and the length of the inner lists in another variable. (The inner lists are all of the same size)
Is it possible to the method used for one list in this case? If not how to do it?