Hi!
I've created three list in a class but when I print them i get <__main__.Kort instance at 0x16eb22b0>
Anyone know how I can get the list to print put its "real" elements?
class Kortlek():
def __init__(self,colors=["blue ", "yellow ", "red "], forms=["triangel", "circle ", "square "], numbers=[1, 2, 3], grades=[1, 2, 3]):
self.cardList = []
self.playerCardList = []
self.lista3 = []
for color in colors:
for form in forms:
for number in numbers:
for grade in grades:
tmp= Kort(color, form, number, grade)
self.cardList.append(tmp)
I read somewhere that you should use __str__ but I didn't understand how...
Thanks! :)