Multi-dimensional list initialization

Gregory Ewing greg.ewing at canterbury.ac.nz
Wed Nov 7 06:34:09 CET 2012


If anything is to be done in this area, it would be better
as an extension of list comprehensions, e.g.

   [[None times 5] times 10]

which would be equivalent to

   [[None for _i in xrange(5)] for _j in xrange(10)]

-- 
Greg


More information about the Python-list mailing list