I want to create a list whilst a the same time create an object The class object is the following
class Kanji:
def __init__(self, kanji, trans, reading, words):
self.kanji= kanji
self.trans= trans
self.reading= reading
self.words = words
And I want to create the object whilst adding it to the list, like so:
lista.append(ひ = Kanji("火","fire",["ひ","び","ほ","か"],"Sample Text"))
But the following error pops up
TypeError: append() takes no keyword arguments
How could i do it?
