-
selfrefers to the class that was inherited from to create the object usingself. - There is no real purpose for the
selfmethod. It’s just legacy computer science jargon that Python keeps to stay consistent with other programming languages. -
selfmeans that no other arguments are required to be passed into the method. -
selfrefers to the instance whose method was called.
Correct Answer:
-
selfrefers to the instance whose method was called.
Explanation: – Try running the example of the Q45 without passing self argument inside the __init__, you’ll understand the reason. You’ll get the error like this __init__() takes 0 positional arguments but 1 was given, this means that something is going inside even if haven’t specified, which is instance itself.