K
KraftDiner
Is there a cleaner way to implement this code?
if len(self.listOfObjects) == 0:
self.listOfObjects.append(self.currentObject)
elif:
self.listOfObjects[self.currentSlice] = self.currentObject
listOfObjects is a list of lists....
If the listOfObjects is [] then I have to use append to add the first
list
otherwise I can access each list using the index into the list.
if len(self.listOfObjects) == 0:
self.listOfObjects.append(self.currentObject)
elif:
self.listOfObjects[self.currentSlice] = self.currentObject
listOfObjects is a list of lists....
If the listOfObjects is [] then I have to use append to add the first
list
otherwise I can access each list using the index into the list.