Question OOP-POLY-0040
EasyWhat is the output of this code?
class P:
def __str__(self):
return "Point"
print(P())
- A.
<main.P object>
- B.
Error
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Polymorphism question
What is the output of this code?
class P:
def __str__(self):
return "Point"
print(P())
<main.P object>
Error
Sign up free to see the answer and a step-by-step explanation.
P
Point