Home / MCQ Bank / Computer
Computer Classes And Objects In Python

What will be the output of the following Python code? class Demo: def __init__(self): pass def test(self): print(__name__) obj = Demo() obj.test()

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option B • __main__

Related Computer Questions

Given only a single array of size 10 and no other memory is available. Which of the following operation is not feasible to implement (Given only push and pop operation)? lappy functions takes ______ arguments in R language. What is the GCD of 48, 18, 0? In HBase, what is the significance of the HBase Data Block Encoding? What will be the output of the following Python code? x = (i for i in range(3)) for i in x: print(i)