QuestionQ35

VerifiedObject-Oriented Programming

What is the expected output from the following code snippet?

Question Image

Explanation

super().__init__() invokes Upper.__init__, which sets property to 'upper'. An object created with Lower() is an instance of Lower, so isinstance(Object, Lower) returns True. The two print calls therefore produce True upper.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!