Anthony Liu wrote:
Yes, that's helpful.  Thanks a lot.

But what if I wanna construct an array of arrays like
we do in C++ or Java:

myArray [][]

Basically, I want to do the following in Python:

myArray[0][1] = list1
myArray[1][2] = list2
myArray[2][3] = list3




here you have to be careful to create N different lists. A list comprehension provides a convenient way to do it:



myArray = [[] for i in range(N)]

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to