Diez B. Roggisch wrote:
seq = [[] for i in xrange(10)]
And the reason you need that approach is given in the FAQ:
http://www.python.org/doc/faq/programming.html#how-do-i-create-a-multidimensional-list
It's a very good idea to read the entire FAQ as soon as you've gotten
past the very basic Python level, so that you can save yourself
and others a lot of time stumbling over the traditional problems
that everyone goes through. You'll learn a lot of useful things
in the process.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list