Home / Programming Questions / Python MCQs / Page 5
Dear candidates you will find MCQ questions of Python here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question
R
Q. What is the length of sys.argv?
R
Q. What is the output of the following code?
def foo(k): k[0] = 1 q = [0] foo(q) print(q)
R
Q. What is the output of the following code?
def foo(fname, val): print(fname(val)) foo(max, [1, 2, 3]) foo(min, [1, 2, 3])
R
Q. What is the output of the following?
elements = [0, 1, 2] def incr(x): return x+1 print(list(map(elements, incr)))
R
Q. What is the output of the following?
elements = [0, 1, 2] def incr(x): return x+1 print(list(map(incr, elements)))
R
Q. What is the output of the following?
def to_upper(k): return k.upper() x = ['ab', 'cd'] print(list(map(to_upper, x)))
R
Q. What is the output of the following?
x = ['ab', 'cd'] print(len(list(map(list, x))))
R
Q. Program code making use of a given module is called a ______ of the module.
Don't have account? Register here.