Home / Programming MCQs / Python MCQs / Question

P

Prashant • 1.36K Points
Master

Q. What will be the output of the following Python code?

Code:
class tester:
    def __init__(self, id):
        self.id = str(id)
        id="224"
 
>>>temp = tester(12)
>>>print(temp.id)
(A) 12
(B) 224
(C) None
(D) Error

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.