AI-assisted, automatically checked• Updated August 2026

Python MCQs

Comprehensive Python MCQs covering data structures, functions, decorators, generators, and OOP concepts.

55 MCQs2 subtopicsProgrammingAll Levels
Key Concept Overview & Exam Context

Review core principles of Python before answering questions. These questions simulate placement technical assessments (TCS, Infosys, Amazon), university exams (CS/IT), and technical certifications.

Target Readiness
Placements & Job Interviews
Question Format
Multiple-Choice with Explanations
Explained Solutions
Written explanations

Python Essentials Quiz

10 questions · Interactive timed test · Instant score & review

Browse by Subtopic

Python MCQ Questions

Page 2 of 2 (55 total)
Q1

What is the syntax used in Python to accept an arbitrary number of keyword arguments?

easy
View Answer & Explanation
Correct Answer: **kwargs
Explanation:
**kwargs captures arbitrary keyword arguments as a dictionary.
Q2

What is the output of the expression: type(lambda x: x * 2)?

medium
View Answer & Explanation
Correct Answer: <class 'function'>
Explanation:
A lambda function in Python is an anonymous function object whose type is <class 'function'>.
Q3

What is the output of bool([]) in Python?

easy
View Answer & Explanation
Correct Answer: False
Explanation:
An empty collection (like an empty list, empty dictionary, or empty string) evaluates to False in Python truth value testing.
Q4

Which built-in Python keyword is used inside a function to produce a generator value lazily?

easy
View Answer & Explanation
Correct Answer: yield
Explanation:
The yield keyword transforms a regular Python function into a generator that yields items one by one on demand.
Q5

What is the output of print([1, 2, 3] * 2) in Python?

easy
View Answer & Explanation
Correct Answer: [1, 2, 3, 1, 2, 3]
Explanation:
Multiplying a list by an integer n concatenates the list with itself n times, creating [1, 2, 3, 1, 2, 3].
Showing 51 to 55 of 55 questions