Q. What will be the result of the following code?
Code:class Base:
def greet(self):
print("Hello from Base")
class Derived(Base):
pass
d = Derived()
d.greet()
β
Correct Answer: (B)
Hello from Base
Explanation: The `Derived` class inherits the `greet` method from `Base`, so it works as expected.