get list of member variables from list of class
oliver.eichler at dspsolutions.de
Fri Jan 28 03:50:47 EST 2005
what will be the fastest solution to following problem
self.varA = 0
self.varB = 0
listA = [a]*10
varA = 
varB = 
for l in listA:
I could think of:
[varA.append(l.varA) for l in listA]
[varB.append(l.varB) for l in listA]
But is this faster? After all I have to iterate over listA several times.
Any better solutions?
More information about the Python-list