- 1
I need some urgent help in Python
I need to know how to define a new parameter in a class that inherits another class. especially a list parameter. i created the init method and put it in this way:- def __init__(self, scores = []): self.scores = scores inside the inheriting class, but it gives type error saying init() takes 1 or 2 positional arguments but 5 were given. well actually the parent class has init with 4 argument and i want another in this class with list. so what to do. pls help.
2 ответов
+ 2
Can you show us the full code, so we can see parent class too. I'd like to help you.
0
well I got it. I have to use that super().