hi
class Questions:
def __init__(self, question: str, correct_answer: str, answers: list[str]):
question.self = question
correct_answer.self = correct_answer
answers.self = answers
def __dict__(self):
<seems like I should put sth here>
def indexing(self):
pass
Questions("where?", "1", ["1. up", "2. down", "3. left", "4. right"])
I have no idea why cant I put a list as an attribute it gives me this error:
question.self = question
^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'self' and no __dict__ for setting new attributes
I have no idea what that dict is, asked some language models, some said I should add it, some said I shouldnt, all I need to do is to put a list as the third attribute so I can start working on other parts of the program