I have an object defined as follows:
class word(object): #object class
def __init__(self, originalWord=None, azWord=None, wLength=None):
self.originalWord = originalWord
self.azWord = azWord
self.wLength = wLength
I have a list called results[], where each index x in the list contains another list of words objects of length x. E.g. in results[3] there is a list of objects of length 3 and one of those objects may be (dog, gdo, 3). I have a value called maxL that represents the length of the list results[]. How do I access (and then print) the attributes I want by iterating through results[] and all of its lists?
This is what I have thus far but I know the syntax is wrong:
for x in range(0,maxL):
for y in results[x]:
print(results[x][y].azWord)