Python MCQ Questions Set-1

python-mcq
This Python MCQ Questions and Answers are based on important and latest topics of Python programming. Q1: What will be the output of the following Python code? class A(): def disp(self): print("A disp()") class B(A): pass obj = B() obj.disp() a) Invalid syntax for inheritance b) Error because when object is created, argument must be passed c) Nothing is printed d) A disp() Answer: d Q2: What will be the output of the following Python code? class Test: de...
Read More