List replication operator
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Fri May 25 12:41:37 EDT 2018
On Fri, 25 May 2018 11:59:38 -0400, Dennis Lee Bieber wrote:
> What is your definition of a multi-dimensional array -- I tend to
think
> of them as pre-declared sizes; not the variable (row|column) lengths
> possible when using nested lists.
Any fixed size array can be implemented using a variable-sized array and
simply NOT increasing or shrinking the array.
Don't want to append an item to the end? Then don't append an item to the
end :-)
(If you really care, you can subclass list and override the methods which
modify the size of the list.)
--
Steve
More information about the Python-list
mailing list