Exam MCQ — Python Technical Interview Questions & Answers
Exam MCQ
Exam MCQ
- MCQs test exact output and tiny traps: indent, == vs =, list vs tuple, mutable default args, is vs ==.
- How to practise: read the snippet, write the output on paper, then run. If wrong, note the trap. That is better than mugging 200 random questions.
- Exam MCQ — output: [1, 2, 3]. y is the same list, not a copy. Classic MCQ trap.
Technical Interview Tip: Dry-run on paper before you look at options.
Code Examples for Exam MCQ
Example
# Exam MCQ
x = [1, 2]
y = x
y.append(3)
print(x)
Exam MCQ — output: [1, 2, 3]. y is the same list, not a copy. Classic MCQ trap.
How to Explain Exam MCQ to an Interviewer
Explain Exam MCQ as if you are teaching a junior — definition, then one tiny script.
MCQs test exact output and tiny traps: indent, == vs =, list vs tuple, mutable default args, is vs ==. How to practise: read the snippet, write the output on paper, then run.
What does the example print, and why?
Exam MCQ — output: [1, 2, 3]
What mistake do freshers make with Exam MCQ?
MCQs test exact output and tiny traps: indent, == vs =, list vs tuple, mutable default args, is vs ==.