Exam PCAP-31-03 All QuestionsBrowse all questions from this exam
Question 54

What is true about Python class constructors? (Choose two.)

    Correct Answer: B, D

    In Python, a class can have only one constructor method, defined by __init__. Therefore, it is true that there can only be one constructor in a Python class. Additionally, the __init__ method must not return a value other than None; its purpose is to initialize the object's attributes, not to produce a result.

Discussion
kstrOptions: BD

BD the correct answer

DKAT2023Options: AB

A and B are corrects