My code:
class Sentence():
def __init__(self, cells, count):
self.cells = set(cells)
self.count = count
class Mines():
def __init__(self):
self.knowledge = []
def add_knowledge(self, cells, count):
# let count=8
# let cells=(1,1) (1,2) (1,3)..........
for i in range(count):
sen=Sentence(cells, count)
self.knowledge.append(sen)
print(self.knowledge)
first of all I have created object of Sentence class then i am appending this in the list. then I want to print self.knowledge in loop. actually I want to print whole list (knowledge) in loop but i am not able to print the list. it gives me output like <mines.Sentence object at 0x00000000042D8748> can anybody help me how i print whole self.knowledge object.