0
I gave 3 arguments to function and it sad I gave 4.
I wrote this (see in program I added) And got message: ... a = number(537, 8, lst) Type error: __init__ takes 3 positional arguments but 4 were given Why is that? https://code.sololearn.com/cuKIHFxEf0Hh/?ref=app
1 Odpowiedź
+ 10
You should precede all your arguments with 'self' as the first one in definition. As you are referring to it later in the code.
def __init__(self, num1, num2, lst):