A
Here, you will find a collection of MCQ questions on Python. Go through these questions to enhance your preparation for upcoming examinations and interviews.
To check the correct answer, simply click the View Answer button provided for each question.
Have your own questions to contribute? Click the button below to share your MCQs with others!
+ Add QuestionA
A
A
def foo(k): k[0] = 1 q = [0] foo(q) print(q)
A
def foo(fname, val): print(fname(val)) foo(max, [1, 2, 3]) foo(min, [1, 2, 3])
A
elements = [0, 1, 2] def incr(x): return x+1 print(list(map(elements, incr)))
A
A
#mod1 def change(a): b=[x*2 for x in a] print(b) #mod2 def change(a): b=[x*x for x in a] print(b) from mod1 import change from mod2 import change #main s=[1,2,3] change(s)
A
tday=datetime.date.today() print(tday.month())
A
A
f = None for i in range (5): with open("data.txt", "w") as f: if i > 2: break print(f.closed)
If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.
Share Your MCQ