Re: [Tutor] Appending to many lists with list comprehension

2005-05-02 Thread jfouhy
Quoting Bernard Lebel <[EMAIL PROTECTED]>: > aList = [ [], [] ] > > > # Iterate attributes of the top object > for oAttribute in oObj.attributes: > > # Append to list 0 the attribute "type" of the current attribute > aList[0].append( str(oAttribute.type) ) > >

[Tutor] Appending to many lists with list comprehension

2005-05-02 Thread Bernard Lebel
Hello, I have an object, and this object has attributes. These attributes are objects in their own right, and each attribute also have its own attributes. So I loop over the "top" object, and for each attribute encountered, I want to put in a list two of the attributes of this attribute. Hope i