> A list of lists is the most logical construction. > But -- you don't need to assemble the rows separately -- > this works too: > >>> my_matrix_as_lists = [ [4, 6, 8, 1],\ > ... [2, 5, 1, 3],\ > ... [2, 1, 2, 8] ]
And you don't need the line continuation characters either. Because Python can tell that the brackets don't match you can just add the newlines directly: >>> mx = [ [1,2,3,4], ... [5,6,7,8] ] >>> Alan g _______________________________________________ Tutor maillist - [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/tutor