On Apr 3, 7:12 pm, "bahoo" <[EMAIL PROTECTED]> wrote: > Hi, > > I want to have many lists, such as list0, list1, list2, ..., each one > holding different number of items. > Is there something like > list[0] > list[1] > list[2] > > so that I can iterate through this list of lists? > > Thanks! > bahoo
listOfLists = [[1,2], [5,7,9], [4,2,1,4,6,6]] No problem there. The lists can contain any objects, including lists. for x in listOfLists: print 'list:', for y in x: print y, print -- http://mail.python.org/mailman/listinfo/python-list